fix(language/sh): only activate tree-sitter in sh and bash scripts

The tree-sitter grammars don't work properly with zsh scripts for
example, so only activate tree-sitter if sh-shell is bash or sh.
This commit is contained in:
2023-02-08 22:15:11 +00:00
parent cead803781
commit e138cb3a84
2 changed files with 5 additions and 3 deletions

View File

@@ -44,8 +44,11 @@
:preface
(defun siren-lsp-bash-mode-setup ()
(if (member sh-shell '(bash sh))
(lsp-deferred)))
(when (member sh-shell '(bash sh))
(if (fboundp 'lsp-deferred)
(lsp-deferred))
(if (fboundp 'tree-sitter-mode)
(tree-sitter-mode t))))
:config
;; Create custom lsp-client for shellcheck diagnostics via efm-langserver.

View File

@@ -14,7 +14,6 @@
php-mode
ruby-mode
rust-mode
sh-mode
terraform-mode
typescript-mode
yaml-mode) . siren-tree-sitter-mode-enable)