Merge branch 'master' into corfu-update-smart-tab
This commit is contained in:
commit
390f5920a2
95 changed files with 928 additions and 1520 deletions
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/company/packages.el
|
||||
|
||||
(package! company :pin "02903bd7088d65a87df0ae0f0d0a7118de147b69")
|
||||
(package! company :pin "b0a522ac5bf8ba3d2f4f22e3aa846a4f82978a16")
|
||||
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
|
||||
(when (modulep! +childframe)
|
||||
(package! company-box :pin "b6f53e26adf948aca55c3ff6c22c21a6a6614253"))
|
||||
(package! company-box :pin "c4f2e243fba03c11e46b1600b124e036f2be7691"))
|
||||
|
|
|
@ -212,6 +212,14 @@ A few variables may be set to change behavior of this module:
|
|||
Whether to prefer navigating org tables over cycling candidates when pressing
|
||||
[[kbd:][TAB]] and [[kbd:][S-TAB]].
|
||||
|
||||
** Turning off auto-completion
|
||||
To disable idle (as-you-type) completion, unset ~corfu-auto~:
|
||||
#+begin_src emacs-lisp
|
||||
;;; in $DOOMDIR/config.el
|
||||
(after! corfu
|
||||
(setq corfu-auto nil))
|
||||
#+end_src
|
||||
|
||||
** Adding CAPFs to a mode
|
||||
To add other CAPFs on a mode-per-mode basis, put either of the following in your
|
||||
~config.el~:
|
||||
|
@ -242,7 +250,7 @@ all CAPFs are interactive to be called this way, in which case you can use
|
|||
* Troubleshooting
|
||||
[[doom-report:][Report an issue?]]
|
||||
|
||||
** Performance issues with ~cape-dabbrev~
|
||||
** Troubleshooting ~cape-dabbrev~
|
||||
|
||||
If you have performance issues with ~cape-dabbrev~, the first thing I recommend
|
||||
doing is to look at the list of buffers Dabbrev is scanning:
|
||||
|
@ -255,6 +263,22 @@ doing is to look at the list of buffers Dabbrev is scanning:
|
|||
... and modify ~dabbrev-ignored-buffer-regexps~ or ~dabbrev-ignored-buffer-modes~
|
||||
accordingly.
|
||||
|
||||
If you see garbage completion candidates, you can use the following command to
|
||||
debug the issue:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;;;###autoload
|
||||
(defun search-in-dabbrev-buffers (search-string)
|
||||
"Search for SEARCH-STRING in all buffers returned by `dabbrev--select-buffers'."
|
||||
(interactive "sSearch string: ")
|
||||
(let ((buffers (dabbrev--select-buffers)))
|
||||
(multi-occur buffers search-string)))
|
||||
|
||||
;; Example usage:
|
||||
;; Why are these weird characters appearing in my completions?
|
||||
(search-in-dabbrev-buffers "\342\200\231")
|
||||
#+end_src
|
||||
|
||||
** Fixing TAB Keybindings
|
||||
|
||||
If you encounter an issue where your ~TAB~ keybindings are not responding in Doom
|
||||
|
|
|
@ -40,7 +40,8 @@ TAB/S-TAB.")
|
|||
('aggressive
|
||||
(not (or (bound-and-true-p mct--active)
|
||||
(bound-and-true-p vertico--input)
|
||||
(eq (current-local-map) read-passwd-map)
|
||||
(and (featurep 'auth-source)
|
||||
(eq (current-local-map) read-passwd-map))
|
||||
(and (featurep 'helm-core) (helm--alive-p))
|
||||
(and (featurep 'ido) (ido-active))
|
||||
(where-is-internal 'minibuffer-complete
|
||||
|
@ -53,7 +54,7 @@ TAB/S-TAB.")
|
|||
(corfu-mode +1))))
|
||||
:config
|
||||
(setq corfu-auto t
|
||||
corfu-auto-delay 0.1
|
||||
corfu-auto-delay 0.18
|
||||
corfu-auto-prefix 2
|
||||
global-corfu-modes '((not
|
||||
erc-mode
|
||||
|
@ -67,8 +68,10 @@ TAB/S-TAB.")
|
|||
corfu-count 16
|
||||
corfu-max-width 120
|
||||
corfu-on-exact-match nil
|
||||
corfu-quit-at-boundary (if (modulep! +orderless) 'separator t)
|
||||
corfu-quit-no-match (if (modulep! +orderless) 'separator t)
|
||||
corfu-quit-at-boundary (if (or (modulep! :completion vertico)
|
||||
(modulep! +orderless))
|
||||
'separator t)
|
||||
corfu-quit-no-match corfu-quit-at-boundary
|
||||
tab-always-indent 'complete)
|
||||
(add-to-list 'completion-category-overrides `(lsp-capf (styles ,@completion-styles)))
|
||||
(add-to-list 'corfu-auto-commands #'lispy-colon)
|
||||
|
@ -112,10 +115,10 @@ TAB/S-TAB.")
|
|||
(use-package! cape
|
||||
:defer t
|
||||
:init
|
||||
(add-hook! prog-mode
|
||||
(add-hook! 'prog-mode-hook
|
||||
(defun +corfu-add-cape-file-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-file -10 t)))
|
||||
(add-hook! (org-mode markdown-mode)
|
||||
(add-hook! '(org-mode-hook markdown-mode-hook)
|
||||
(defun +corfu-add-cape-elisp-block-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-elisp-block 0 t)))
|
||||
;; Enable Dabbrev completion basically everywhere as a fallback.
|
||||
|
@ -124,17 +127,23 @@ TAB/S-TAB.")
|
|||
;; Set up `cape-dabbrev' options.
|
||||
(defun +dabbrev-friend-buffer-p (other-buffer)
|
||||
(< (buffer-size other-buffer) +corfu-buffer-scanning-size-limit))
|
||||
(add-hook! (prog-mode text-mode conf-mode comint-mode minibuffer-setup
|
||||
eshell-mode)
|
||||
(add-hook! '(prog-mode-hook
|
||||
text-mode-hook
|
||||
conf-mode-hook
|
||||
comint-mode-hook
|
||||
minibuffer-setup-hook
|
||||
eshell-mode-hook)
|
||||
(defun +corfu-add-cape-dabbrev-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-dabbrev 20 t)))
|
||||
(after! dabbrev
|
||||
(setq dabbrev-friend-buffer-function #'+dabbrev-friend-buffer-p
|
||||
dabbrev-ignored-buffer-regexps
|
||||
'("^ "
|
||||
'("\\` "
|
||||
"\\(TAGS\\|tags\\|ETAGS\\|etags\\|GTAGS\\|GRTAGS\\|GPATH\\)\\(<[0-9]+>\\)?")
|
||||
dabbrev-upcase-means-case-search t)
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode)))
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode)
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'doc-view-mode)
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'tags-table-mode)))
|
||||
|
||||
;; Make these capfs composable.
|
||||
(advice-add #'lsp-completion-at-point :around #'cape-wrap-noninterruptible)
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/corfu/packages.el
|
||||
|
||||
(package! corfu :pin "c1e7b6190b00158e67347b4db0a8f7964e5d2f8b")
|
||||
(package! cape :pin "a397a0c92de38277b7f835fa999fac400a764908")
|
||||
(package! corfu :pin "35cd5a0f3cba89766072e3e933d1fe2ee02f2289")
|
||||
(package! cape :pin "e01e4430234850263d326ad4521849cd46e64059")
|
||||
(when (modulep! +icons)
|
||||
(package! nerd-icons-corfu :pin "7077bb76fefc15aed967476406a19dc5c2500b3c"))
|
||||
(when (modulep! +orderless)
|
||||
(package! orderless :pin "b24748093b00b37c3a572c4909f61c08fa27504f"))
|
||||
(when (and (not (modulep! :completion vertico))
|
||||
(modulep! +orderless))
|
||||
;; enabling +orderless without vertico should be fairly niche enough that to
|
||||
;; save contributor headaches we should only pin vertico's orderless and leave
|
||||
;; this one unpinned
|
||||
(package! orderless))
|
||||
(when (modulep! :os tty)
|
||||
(package! corfu-terminal :pin "501548c3d51f926c687e8cd838c5865ec45d03cc"))
|
||||
(when (modulep! :editor snippets)
|
||||
|
|
|
@ -43,7 +43,9 @@ Can be negative.")
|
|||
;; symbol at point.
|
||||
helm-imenu-execute-action-at-once-if-one nil
|
||||
;; Disable special behavior for left/right, M-left/right keys.
|
||||
helm-ff-lynx-style-map nil)
|
||||
helm-ff-lynx-style-map nil
|
||||
;; Don't commandeer the entire frame for helm commands.
|
||||
helm-always-two-windows nil)
|
||||
|
||||
(map! [remap apropos] #'helm-apropos
|
||||
[remap find-library] #'helm-locate-library
|
||||
|
@ -188,7 +190,13 @@ Can be negative.")
|
|||
|
||||
|
||||
(use-package! helm-descbinds
|
||||
:hook (helm-mode . helm-descbinds-mode))
|
||||
:hook (helm-mode . helm-descbinds-mode)
|
||||
:config
|
||||
;; HACK: Upstream claims that the two packages are incompatible, but changing
|
||||
;; `prefix-help-command' seems to smooth the incompatibility over. More
|
||||
;; testing is needed...
|
||||
(setq helm-descbinds-disable-which-key nil
|
||||
prefix-help-command #'helm-descbinds))
|
||||
|
||||
|
||||
(use-package! helm-icons
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/helm/packages.el
|
||||
|
||||
(package! helm :pin "f34ea6b702648e5c7535a704bdb6c4d7afb4b3b8")
|
||||
(package! helm :pin "28f62344fed0d8be0bcef5aa8a018ba58198ba0c")
|
||||
(package! helm-company :pin "4622b82353220ee6cc33468f710fa5b6b253b7f1")
|
||||
(package! helm-c-yasnippet :pin "c5880e740da101fde7a995e94a7b16c330e57583")
|
||||
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")
|
||||
(package! helm-descbinds :pin "ca03f02da4e54a1d0a2d5498b86e1639aa808d8c")
|
||||
(package! helm-describe-modes :pin "11fb36af119b784539d31c6160002de1957408aa")
|
||||
(package! helm-projectile :pin "e2e38825c975269a4971df25e79b2ae98929624e")
|
||||
(package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/ivy/packages.el
|
||||
|
||||
(package! swiper :pin "8c30f4cab5948aa8d942a3b2bbf5fb6a94d9441d")
|
||||
(package! swiper :pin "1f88e5499046d166d22bf733a3877aec3b424947")
|
||||
(package! ivy)
|
||||
(package! ivy-hydra)
|
||||
(package! ivy-avy)
|
||||
|
@ -13,7 +13,7 @@
|
|||
(package! wgrep :pin "208b9d01cfffa71037527e3a324684b3ce45ddc4")
|
||||
|
||||
(if (modulep! +prescient)
|
||||
(package! ivy-prescient :pin "4b875be52e75f7b81e68a16b62cfbb2f2584042c")
|
||||
(package! ivy-prescient :pin "c39bf07c56b427bf41aafd7d20eaef5cf3c312b5")
|
||||
(when (modulep! +fuzzy)
|
||||
(package! flx :pin "4b1346eb9a8a76ee9c9dede69738c63ad97ac5b6")))
|
||||
|
||||
|
|
|
@ -83,6 +83,9 @@ orderless."
|
|||
((string= "!" pattern) `(orderless-literal . ""))
|
||||
;; Without literal
|
||||
((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))
|
||||
;; Annotation
|
||||
((string-prefix-p "&" pattern) `(orderless-annotation . ,(substring pattern 1)))
|
||||
((string-suffix-p "&" pattern) `(orderless-annotation . ,(substring pattern 0 -1)))
|
||||
;; Character folding
|
||||
((string-prefix-p "%" pattern) `(char-fold-to-regexp . ,(substring pattern 1)))
|
||||
((string-suffix-p "%" pattern) `(char-fold-to-regexp . ,(substring pattern 0 -1)))
|
||||
|
@ -157,13 +160,16 @@ orderless."
|
|||
(consult-customize
|
||||
consult-ripgrep consult-git-grep consult-grep
|
||||
consult-bookmark consult-recent-file
|
||||
+default/search-project +default/search-other-project
|
||||
+default/search-project-for-symbol-at-point
|
||||
+default/search-cwd +default/search-other-cwd
|
||||
+default/search-notes-for-symbol-at-point
|
||||
+default/search-emacsd
|
||||
consult--source-recent-file consult--source-project-recent-file consult--source-bookmark
|
||||
:preview-key "C-SPC")
|
||||
(when (modulep! :config default)
|
||||
(consult-customize
|
||||
+default/search-project +default/search-other-project
|
||||
+default/search-project-for-symbol-at-point
|
||||
+default/search-cwd +default/search-other-cwd
|
||||
+default/search-notes-for-symbol-at-point
|
||||
+default/search-emacsd
|
||||
:preview-key "C-SPC"))
|
||||
(consult-customize
|
||||
consult-theme
|
||||
:preview-key (list "C-SPC" :debounce 0.5 'any))
|
||||
|
@ -195,13 +201,20 @@ orderless."
|
|||
|
||||
|
||||
(use-package! consult-dir
|
||||
:bind (([remap list-directory] . consult-dir)
|
||||
:defer t
|
||||
:init
|
||||
(map! [remap list-directory] #'consult-dir
|
||||
(:after vertico
|
||||
:map vertico-map
|
||||
("C-x C-d" . consult-dir)
|
||||
("C-x C-j" . consult-dir-jump-file))
|
||||
"C-x C-d" #'consult-dir
|
||||
"C-x C-j" #'consult-dir-jump-file))
|
||||
:config
|
||||
;; DEPRECATED: Remove when Doom core replaces projectile with project.el
|
||||
(setq consult-dir-project-list-function #'consult-dir-projectile-dirs)
|
||||
|
||||
(when (modulep! :tools docker)
|
||||
;; TODO Replace with `tramp-container--completion-function' when we drop support for <29
|
||||
;; TODO: Replace with `tramp-container--completion-function' when we drop
|
||||
;; support for <29
|
||||
(defun +vertico--consult-dir-container-hosts (host)
|
||||
"Get a list of hosts from HOST."
|
||||
(cl-loop for line in (cdr
|
||||
|
@ -209,10 +222,7 @@ orderless."
|
|||
(apply #'process-lines +vertico-consult-dir-container-executable
|
||||
(append +vertico-consult-dir-container-args (list "ps")))))
|
||||
for cand = (split-string line "[[:space:]]+" t)
|
||||
collect (let ((user (unless (string-empty-p (car cand))
|
||||
(concat (car cand) "@")))
|
||||
(hostname (car (last cand))))
|
||||
(format "/%s:%s%s:/" host user hostname))))
|
||||
collect (format "/%s:%s:/" host (car (last cand)))))
|
||||
|
||||
(defun +vertico--consult-dir-podman-hosts ()
|
||||
(let ((+vertico-consult-dir-container-executable "podman"))
|
||||
|
@ -229,7 +239,7 @@ orderless."
|
|||
:face consult-file
|
||||
:history file-name-history
|
||||
:items ,#'+vertico--consult-dir-podman-hosts)
|
||||
"Podman candiadate source for `consult-dir'.")
|
||||
"Podman candidate source for `consult-dir'.")
|
||||
|
||||
(defvar +vertico--consult-dir-source-tramp-docker
|
||||
`(:name "Docker"
|
||||
|
@ -238,7 +248,7 @@ orderless."
|
|||
:face consult-file
|
||||
:history file-name-history
|
||||
:items ,#'+vertico--consult-dir-docker-hosts)
|
||||
"Docker candiadate source for `consult-dir'.")
|
||||
"Docker candidate source for `consult-dir'.")
|
||||
|
||||
(add-to-list 'consult-dir-sources '+vertico--consult-dir-source-tramp-podman t)
|
||||
(add-to-list 'consult-dir-sources '+vertico--consult-dir-source-tramp-docker t))
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/vertico/packages.el
|
||||
|
||||
(package! vertico :pin "68cbd47589446e9674921bae0b98ff8fbe28be23")
|
||||
(package! vertico :pin "68e51fda552a2f91caab69e83564bc91275b09b1")
|
||||
|
||||
(package! orderless :pin "dc7a781acf2e58ac7d20d1b522be0cde5213e057")
|
||||
(package! orderless :pin "ac4aeb66f331f4c4a430d5556071e33177304c37")
|
||||
|
||||
(package! consult :pin "b48ff6bf0527baeb6bfd07c6da9d303ff0b79c3d")
|
||||
(package! consult :pin "c87b0bf06de0c3cb60bc8d257c770cb981ddcd19")
|
||||
(package! consult-dir :pin "3f5f4b71ebe819392cb090cda71bd39a93bd830a")
|
||||
(when (and (modulep! :checkers syntax)
|
||||
(not (modulep! :checkers syntax +flymake)))
|
||||
(package! consult-flycheck :pin "754f5497d827f7d58009256a21af614cc44378a3"))
|
||||
(package! embark :pin "c93abadc8220c0caa6fea805f7a736c346d47e7e")
|
||||
(package! embark-consult :pin "c93abadc8220c0caa6fea805f7a736c346d47e7e")
|
||||
(package! embark :pin "d3c9d1b4c890cf365846cc2b418f37341999e79f")
|
||||
(package! embark-consult :pin "d3c9d1b4c890cf365846cc2b418f37341999e79f")
|
||||
|
||||
(package! marginalia :pin "f6fe86b989a177355ab3ff7e97a384e10a7b0bb1")
|
||||
(package! marginalia :pin "3275d1f85cb020280979a050054b843f7563aea2")
|
||||
|
||||
(package! wgrep :pin "208b9d01cfffa71037527e3a324684b3ce45ddc4")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue