mickeynp / combobulate

Structured Editing and Navigation in Emacs with Tree-Sitter
GNU General Public License v3.0
929 stars 54 forks source link

Can't shut combobulate off/only use in some buffers #53

Open girzel opened 1 year ago

girzel commented 1 year ago

Hi! I'm enjoying using combobulate-mode in python-ts-mode buffers. However, for various reasons, I can't use it in all Python buffers. But turning combobulate-mode on makes keybinding changes that turning combobulate-mode off doesn't undo. How hard would it be provide a combobulate-teardown function, that does the opposite of combobulate-setup-1?

It's a little more complicated than that, though -- just turning combobulate-mode on in one Python buffer causes TAB to fail in all other Python buffers without combobulate running:

if: There are no production rules in ‘combobulate-navigation-rules’.

If you are adding a new language, ensure the grammar files are:

1. Properly built using ‘build/build-relationships.py’, and that you have sourced the ‘grammar.json’ and ‘node-types.json’ files.
2. That the rebuilt ‘combobulate-rules.el’ file is evaluated in your Emacs session.
3. That the name of the grammar matches that in ‘combobulate-rules.el’.

So once I've used combobulate-mode in one buffer, I need to enable it in all Python buffers. It would be nice if this didn't happen.

Thanks!
Eric

mickeynp commented 1 year ago

Combobulate rebinds your TAB key using local-set-key so it'll affect all buffers that share that mode map. I don't know how you wound up with all these errors, nor why you say (but do not expound) on why you can't use it in all the buffers.