diff --git a/docs/modules.org b/docs/modules.org index b27ea6f66..df245abf3 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -142,7 +142,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/rust/README.org][rust]] =+lsp= - TODO + scala =+lsp= - TODO + [[file:../modules/lang/scheme/README.org][scheme]] - TODO -+ [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp= - TODO ++ [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp +powershell= - TODO + [[file:../modules/lang/sml/README.org][sml]] - TODO + [[file:../modules/lang/solidity/README.org][solidity]] - TODO + swift =+lsp= - TODO 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..944cebbf0 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) + :defer t + :config + (when (featurep! +lsp) + (add-hook 'powershell-mode-local-vars-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"))