combobulate icon indicating copy to clipboard operation
combobulate copied to clipboard

Adding support for a new language

Open lem102 opened this issue 1 year ago • 8 comments

I'd like to add support for a new lanugage.

As advised in the readme, I have looked at the code for json support. This file doesn't seem to contain anything that tells combobulate that there is support for json.

Other than creating a similar file for the new language, what else do I need to do to at least tell combobulate that there is some support for a new language?

P.S. What does the build-relationships.py script do?

Cheers.

lem102 avatar Apr 15 '24 07:04 lem102

Please use the development branch as it is substantially different and should be somewhat simpler to set up.

The python script downloads the rules and types and updates the rules file. It's required. You'll need to define the procedures for the language, with JSON being but one example of how to do it.

The language definer macro in the development branch is what you want to use.

mickeynp avatar Apr 16 '24 06:04 mickeynp

Wow, that branch IS significantly different.

One more question; Is there a recommended starting point for adding a new language? (e.g. getting forward sexp to work)

Thanks for your info and the package :)

lem102 avatar Apr 16 '24 08:04 lem102

Not really, I'm afraid. Looking at other languages and experimenting is the only way, until I add documentation.

mickeynp avatar Apr 16 '24 08:04 mickeynp

How's the documentation looking? It's somewhat overwhelming trying to reverse engineer hwo to add support for a new language by looking at the existing language files :). I've personally an interest in Haskell, Rust, C and Nix

MagicRB avatar Sep 19 '24 15:09 MagicRB

Have a read here:

https://github.com/mickeynp/combobulate/wiki/Adding-a-New-Language-to-Combobulate

And let me know what you think

mickeynp avatar Sep 25 '24 08:09 mickeynp

Thanks for writing that up @mickeynp

Does the suggestion "Please use the development branch as it is substantially different and should be somewhat simpler to set up." still hold when adding a new language? I'm working on adding support for my language of choice OCaml.

tmcgilchrist avatar Mar 05 '25 03:03 tmcgilchrist

Yes, development is usually ahead of master, and should be used

mickeynp avatar Mar 05 '25 09:03 mickeynp

Have a read here:

https://github.com/mickeynp/combobulate/wiki/Adding-a-New-Language-to-Combobulate

And let me know what you think

It definitely helps. For me its still kind of unclear why there seem to be treesitter json files in the tree, and also what becomes different if you would like to start from a point where there is an existing treesiter, and language mode like clojure-ts

jave avatar Apr 07 '25 22:04 jave