Add support for various treesitter based modes#108
Conversation
|
Hi, thanks for this! I'm happy to merge the adding rules for treesitter modes part as is. The electric-operator-c-ts-is-function-parameter? function though I would need tests for. We might need to start running CI on newer versions to do that? It also seems like it needs some tweaks to compile on old Emacs versions. Maybe just a (function local) require? |
|
The failure on 25.3 looks unrelated, I think it's ok to ignore for this pr if the others pass. |
a19e3b1 to
1e07208
Compare
Yes. We shall require a CI with Emacs 29.x (which don't have a stable release yet). I have added a local require, may be I can move it to the top as it won't error on fail. In case the CI is still failing, I shall try setting up some system with an older Emacs to check. |
|
Sorry about the overly strict ci approval thing, it should be fixed to just run without needing that now |
1e07208 to
ed7afe4
Compare
|
Forgot to ping you after my last push |
ed7afe4 to
3cfca10
Compare
|
So I think I owe you an update on this: treesitter seems like it will make it possible to handle a lot more edge cases which is exciting, but right now I don't understand it. If you want to get this merged soon then I'll need some tests for the edge cases that the new code handles. I've updated the tested emacs versions on master and it sounds like the 29.1 build used should contain treesittter, so you can rebase and then you should be able to write some tests. Otherwise: I'm working on getting my emacs config to work with 29.1 so that I can play around with treesitter. Once I've done that I'll be in a better place to write the tests myself. I don't have a lot of spare time these days though so that might be a while. |
|
Oh, I've also changed another setting which will hopefully allow your CI checks to run without manual approval 🤞 |
This commit adds support for c-ts-mode, python-ts-mode and rust-ts-mode. These modes are builtin modes included in GNU Emacs since 29.1
3cfca10 to
9aa3340
Compare
|
Thanks for the update. I tried running the c-mode operator tests with c-ts-mode, and it fails in around 12 tests. Can you add an empty Also, I think the CI image with emacs 29.1 has builtin treesitter support, but the parsers (ie, treesitter-c, etc) are not available. So far it's working fine for me without much hiccup. But I agree that it's better to be merged only after we have some tests. |
This commit adds support for c-ts-mode, python-ts-mode and
rust-ts-mode.
These modes are builtin modes included in GNU Emacs since 29.1
I have only added support for modes that I currently use.