mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(sh): add capf completion in shell scripts
For corfu (and non-lsp) users, primarily.
This commit is contained in:
@ -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
|
||||
|
@ -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"))
|
||||
|
Reference in New Issue
Block a user