dev: merging from master
This commit is contained in:
commit
ab7216f40a
6 changed files with 40 additions and 18 deletions
|
@ -244,6 +244,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
|
||||
|
||||
* Frequently asked questions
|
||||
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
||||
|
||||
|
|
|
@ -55,8 +55,10 @@ use the minibuffer such as `query-replace'.")
|
|||
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)
|
||||
|
|
|
@ -5,8 +5,12 @@
|
|||
(package! cape :pin "a397a0c92de38277b7f835fa999fac400a764908")
|
||||
(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)
|
||||
|
|
|
@ -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)))
|
||||
|
@ -202,7 +205,8 @@ orderless."
|
|||
("C-x C-j" . consult-dir-jump-file))
|
||||
:config
|
||||
(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
|
||||
|
@ -210,10 +214,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"))
|
||||
|
@ -230,7 +231,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"
|
||||
|
@ -239,7 +240,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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue