> From: Yuan Fu <casouri@gmail.com> > Date: Fri, 25 Nov 2022 01:43:39 -0800 > Cc: "T.V Raman" <raman@google.com>, > emacs-devel@gnu.org > > > BTW, how can a user decide that tree-sitter modes should be used? For > > example, when I open a json file I get js-json-mode, not json-ts-mode, > > which also works, so support is available. Should user's augment > > auto-mode-alist? Or is there some "enable TS whenever possible and the > > devs think its support is in a usable state for that language" toggle? > > There is no global toggle, unfortunately. You could use auto-mode-alist or > major-mode-remap-alist to enable tree-sitter modes, yes. I imagine there > could be a third-party package that automatically enables tree-sitter for all > supported nodes, maybe. I'm not sure a global toggle would make sense at this time: even if the user has the tree-sitter library installed, there's no guarantee that the grammar for a particular language is also installed. Only the user knows whether it is or isn't. Enabling a mode just to get an error message makes little sense. Perhaps in the future distros will catch up and provide installation of grammars that includes everything available, but until they do, we are better off with individual toggles. There's also a question of user preferences: some might prefer the non-TS versions for whatever reasons. IMO, per-mode toggles is currently the best compromise, given that we don't yet have enough user feedback and experience to decide on more general knobs.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4