diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index d1699bef1..7bb128b6b 100755 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -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 diff --git a/modules/lang/sh/packages.el b/modules/lang/sh/packages.el index b530f5059..73934669b 100644 --- a/modules/lang/sh/packages.el +++ b/modules/lang/sh/packages.el @@ -1,8 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/sh/packages.el -(when (modulep! :completion company) - (package! company-shell :pin "5f959a63a6e66eb0cbdac3168cad523a62cc2ccd")) +(unless (modulep! +lsp) + (when (modulep! :completion company) + (package! company-shell :pin "5f959a63a6e66eb0cbdac3168cad523a62cc2ccd")) + (when (modulep! :completion corfu) + (package! bash-completion :pin "a4c8fbc90221b01d5376ad068d3640350d9130a8"))) (when (modulep! +fish) (package! fish-mode :pin "2526b1803b58cf145bc70ff6ce2adb3f6c246f89"))