From 6b203d74c9fb6f1cc6df8d1c2e4fc973c7b930fc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Aug 2025 17:32:56 +0200 Subject: [PATCH] refactor(sh): remove tree-sitter support bash-ts-mode is inferior to shell-script-mode's syntax highlighting and no other *-ts-mode modes are available for other shells (though, there *are* powershell and nushell ts-modes; I'll investigate those later). --- modules/lang/sh/README.org | 5 +---- modules/lang/sh/config.el | 3 --- modules/lang/sh/doctor.el | 4 ---- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index 130aed01c..fcaa225be 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -23,10 +23,7 @@ Fish script) to Doom Emacs. (supports bash-language-server). - +powershell :: Add syntax highlighting for Powershell script files (=.ps1= and =.psm1=). -- +tree-sitter :: - Leverages tree-sitter for better syntax highlighting and structural text - editing. Requires [[doom-module::tools tree-sitter]]. - + ** Packages - [[doom-package:company-shell]] if [[doom-module::completion company]] - [[doom-package:fish-mode]] if [[doom-module:+fish]] diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index 7bb128b6b..ae08047af 100755 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -37,9 +37,6 @@ (when (modulep! +lsp) (add-hook 'sh-mode-local-vars-hook #'lsp! 'append)) - (when (modulep! +tree-sitter) - (add-hook 'sh-mode-local-vars-hook #'tree-sitter! 'append)) - (setq sh-indent-after-continuation 'always) ;; [pedantry intensifies] diff --git a/modules/lang/sh/doctor.el b/modules/lang/sh/doctor.el index a5a6ce2a5..60446af00 100644 --- a/modules/lang/sh/doctor.el +++ b/modules/lang/sh/doctor.el @@ -7,7 +7,3 @@ (when (modulep! :editor format) (unless (executable-find "shfmt") (warn! "Couldn't find shfmt. Code formatting will not work."))) - -(assert! (or (modulep! -tree-sitter) - (modulep! :tools tree-sitter)) - "This module requires (:tools tree-sitter)")