Open IceAsteroid opened 7 months ago
Adding sh-mode
to the bash-ts-mode-hook
solved the problem. Like follows
(add-hook 'bash-ts-mode-hook 'sh-mode)
I wonder why other modes work fine, but this mode does not
sh-mode
is a bit special, and honestly kind of a pain to program around
Since you have a workaround, I'm not sure if we should keep this issue open?
If the
(global-treesit-auto-mode t)
is set, opening a bash script would not enable thesh-mode
.The reason for sh-mode to be enabled is its useful keybindings for various features it provides.
If I was to set the following, the
*message*
buffer would complaint:File mode specification error: (excessive-lisp-nesting 1601)
For example:
After
toggle-debug-on-error
is toggled, and to reopen a bash script, the debugger would output:The problem is, how could I also have
sh-mode
enabled when(global-treesit-auto-mode t)
is set?Other programming modes like for python work fine, for example, I've set to enable eglot for python files
Nice and simple, and it works, the python-mode's keybindings and features are loaded unlike sh-mode