diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index 873d4a2a4..8ce5159fb 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -23,10 +23,12 @@ This module adds support for shell scripting languages. + =+lsp= Enables LSP support for sh-mode. This requires the =:tools lsp= module to be enabled and [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] to be installed on your system. + =+fish= Add syntax highlighting for fish script files. ++ =+powershell= Add syntax highlighting for Powershell script files .ps1 and .psm1 ** Plugins + [[https://github.com/Alexander-Miller/company-shell][company-shell]]* (=:completion company=) + [[https://github.com/wwwjfy/emacs-fish][fish-mode]]* (=+fish=) ++ [[https://github.com/jschaf/powershell.el][powershell-mode]]* (=+powershell=) ** Hacks + Interpolated variables are fontified. diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index b6a0b270b..2eff2461c 100755 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -65,7 +65,6 @@ ;; autoclose backticks (sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p))) - (use-package! company-shell :when (featurep! :completion company) :unless (featurep! +lsp) @@ -74,8 +73,14 @@ (set-company-backend! 'sh-mode '(company-shell company-files)) (setq company-shell-delete-duplicates t)) - (use-package! fish-mode :when (featurep! +fish) :defer t :config (set-formatter! 'fish-mode #'fish_indent)) + +(use-package! powershell + :when (featurep! +powershell) + :mode (("\\.ps1\\'" . powershell-mode) + ("\\.psm1\\'" . powershell-mode)) + :config (when (featurep! +lsp) + (add-hook 'powershell-mode-hook #'lsp!))) diff --git a/modules/lang/sh/packages.el b/modules/lang/sh/packages.el index 02c841a71..6f8539bbe 100644 --- a/modules/lang/sh/packages.el +++ b/modules/lang/sh/packages.el @@ -6,3 +6,6 @@ (when (featurep! +fish) (package! fish-mode :pin "db257db81058b0b12f788c324c264cc59b9a5bf4")) + +(when (featurep! +powershell) + (package! powershell :pin "87826777bd3ebd53740be99b4546bfc11ccc625d"))