4 ms·
> Emacs figures out the language and loads the appropriate sub-modes. Not really. You setup hooks, usually based by fileextension, and emacs execute the hooks.
by PurpleRamen 3y ago
> Emacs figures out the language and loads the appropriate sub-modes.
Not really. You setup hooks, usually based by fileextension, and emacs execute the hooks. Emacs itself has no understanding of languages. And this will not work well when there is no hook executed.
> Modes are mixable.
You can load multiple minor-modes, but there is always just one major-mode per buffer, and languages are usually major-modes. But ok, treesitter can be handled as a minor. But it still needs explicit support. You cannot give treesitter control over a range of text, let if figure out the language automatically and let it make it's thing. This needs explicit support.