Whenever I visit a buffer for a grammar I do not have treesit-auto does the right thing and installs it. However it still keeps the major mode of, for example, go-mode instead of go-ts-mode. If I set a hook just for go-ts-mode and install the grammar the file loads as go-mode and it does not pick up my hook. It seems to me that once the grammar is installed for the very first time the major mode should switch automatically when the buffer loads. If I describe the variable after that grammar installation I am still getting the non-ts mode for whatever reason. At that point I have to restart emacs to see the correct major mode.
Because of this I have to set hooks for both modes. This is not ideal.
Here's my current setup
Whenever I visit a buffer for a grammar I do not have treesit-auto does the right thing and installs it. However it still keeps the major mode of, for example,
go-mode
instead ofgo-ts-mode
. If I set a hook just forgo-ts-mode
and install the grammar the file loads asgo-mode
and it does not pick up my hook. It seems to me that once the grammar is installed for the very first time the major mode should switch automatically when the buffer loads. If I describe the variable after that grammar installation I am still getting the non-ts mode for whatever reason. At that point I have to restart emacs to see the correct major mode.Because of this I have to set hooks for both modes. This is not ideal.