feat(sh): add capf completion in shell scripts

For corfu (and non-lsp) users, primarily.
This commit is contained in:
Henrik Lissner
2025-04-24 21:51:38 -04:00
parent 61f69ca980
commit 795708c116
2 changed files with 15 additions and 2 deletions

View File

@@ -72,6 +72,7 @@
;; autoclose backticks
(sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p)))
(use-package! company-shell
:when (modulep! :completion company)
:unless (modulep! +lsp)
@@ -83,6 +84,15 @@
company-shell-dont-fetch-meta (featurep :system 'macos)))
(use-package! bash-completion
:when (modulep! :completion corfu)
:unless (modulep! +lsp)
:init
(add-hook! 'sh-mode-hook
(add-hook 'completion-at-point-functions
#'bash-completion-capf-nonexclusive nil t)))
(use-package! powershell
:when (modulep! +powershell)
:defer t