-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guide for adding new languages #57
Comments
There's no such thing as an agnostic language. That materially cannot exist as each grammar is its own, with its own set of rules and idiosyncrasies. Therefore, Combobulate can't do it either. Sure, you can probably wing it, but it will not work well. Finding siblings with You'll need to load and update the rules with support for Julia, yes. The build-relationships script should do all the work for you, though you do need to add an URL to its internal dict to support it. The production rules are required (for some things) because tree-sitter cannot tell you what the parents or children of certain nodes or fields are valid. |
I see, thanks for the reply. I used the helix editor for a short while, and have been missing the "select a increasingly growing region" quite a lot. I understand helix achieves this (somewhat "basic" behaviour) without specializing for every language, so I was hoping to get some basic similar functionality out of combobulate too. However, it seems combobulate is designed with more advanced functionality in mind. I have found that the functionality I am looking for is mostly provided by plain treesit, and exposed e.g. through ts-movement, which seems to do the job for me with zero language specific customization. Still, probably combobulate can provide a much better interface if the language is supported. |
Expanding a region is a basic feature in Combobulate, and is easy to enable. Configure Type Sibling navigation has nothing to do with any of this, so if that's also something you need, it's distinct from expand region. Indeed, expand region (depending on how you choose to define it) is usually a case of picking nodes at point and expanding. It just so happens that Combobulate lets you configure which ones you want it to use. |
Hello,
looks like an awesome package, and I would love to use it for structual navation in Julia and orgmode files.
Since the goal this project is to "relatively easy to add new languages" I gave it a shot, starting off with the
combobulate-python.el
file, and removing (for now) everything related to indentation.However, I'm running into some confusions. Several times, the function
combobulate-production-rules-get
loads information from several json files (e.g.python.json
,python-grammar.json
, python-nodes.json), which have to be written and somehow processed with the
build-relationships.py` script (?)For now, I would just like to have a minimum viable version of combobulate that supports basic navigation like traversing the tree up/down/sidewards/etc. Since I understand elements like
treesit-node-next-sibling
etc are all implemented, I imagine I should be able to get a version ofcombobulate-julia.el
going without touching any.json
files at all. Is that correct?Perhaps it would be helpful to provide a language-agnostic version
combobulate-anylang.el
that gets started with basic navigation functionality, and which can further be refined with custom rules etc etc.Thanks!
The text was updated successfully, but these errors were encountered: