completion/selectrum -> completion/vertico, part 3
- Rename all functions and variables in the module to reflect the namechange (and the irc jump function)
This commit is contained in:
parent
24eaa1317c
commit
a0eb4e9b65
13 changed files with 55 additions and 55 deletions
|
@ -1,14 +1,14 @@
|
|||
;; completion/vertico/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+selectrum:project-search "completion/vertico/autoload/evil" nil t)
|
||||
(evil-define-command +selectrum:project-search (query &optional all-files-p)
|
||||
"Ex interface for `+selectrum/project-search'."
|
||||
;;;###autoload (autoload '+vertico:project-search "completion/vertico/autoload/evil" nil t)
|
||||
(evil-define-command +vertico:project-search (query &optional all-files-p)
|
||||
"Ex interface for `+vertico/project-search'."
|
||||
(interactive "<a><!>")
|
||||
(+selectrum/project-search all-files-p query))
|
||||
(+vertico/project-search all-files-p query))
|
||||
|
||||
;;;###autoload (autoload '+selectrum:project-search-from-cwd "completion/vertico/autoload/evil" nil t)
|
||||
(evil-define-command +selectrum:project-search-from-cwd (query &optional recurse-p)
|
||||
"Ex interface for `+selectrum/project-search-from-cwd'."
|
||||
;;;###autoload (autoload '+vertico:project-search-from-cwd "completion/vertico/autoload/evil" nil t)
|
||||
(evil-define-command +vertico:project-search-from-cwd (query &optional recurse-p)
|
||||
"Ex interface for `+vertico/project-search-from-cwd'."
|
||||
(interactive "<a><!>")
|
||||
(+selectrum/project-search-from-cwd (not recurse-p) query))
|
||||
(+vertico/project-search-from-cwd (not recurse-p) query))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; completion/vertico/autoload/vertico.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defadvice! +selectrum--company-capf--candidates-a (fn &rest args)
|
||||
(defadvice! +vertico--company-capf--candidates-a (fn &rest args)
|
||||
"Highlight company matches correctly, and try default completion styles before
|
||||
orderless."
|
||||
:around 'company-capf--candidates
|
||||
|
@ -10,7 +10,7 @@ orderless."
|
|||
(apply fn args)))
|
||||
|
||||
;;;###autoload
|
||||
(cl-defun +selectrum-file-search (&key query in all-files (recursive t) prompt args)
|
||||
(cl-defun +vertico-file-search (&key query in all-files (recursive t) prompt args)
|
||||
"Conduct a file search using ripgrep.
|
||||
|
||||
:query STRING
|
||||
|
@ -56,27 +56,27 @@ orderless."
|
|||
(consult--grep prompt ripgrep-command directory query)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/project-search (&optional arg initial-query directory)
|
||||
(defun +vertico/project-search (&optional arg initial-query directory)
|
||||
"Peforms a live project search from the project root using ripgrep.
|
||||
If ARG (universal argument), include all files, even hidden or compressed ones,
|
||||
in the search."
|
||||
(interactive "P")
|
||||
(+selectrum-file-search :query initial-query :in directory :all-files arg))
|
||||
(+vertico-file-search :query initial-query :in directory :all-files arg))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/project-search-from-cwd (&optional arg initial-query)
|
||||
(defun +vertico/project-search-from-cwd (&optional arg initial-query)
|
||||
"Performs a live project search from the current directory.
|
||||
If ARG (universal argument), include all files, even hidden or compressed ones."
|
||||
(interactive "P")
|
||||
(+selectrum/project-search arg initial-query default-directory))
|
||||
(+vertico/project-search arg initial-query default-directory))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/search-symbol-at-point ()
|
||||
(defun +vertico/search-symbol-at-point ()
|
||||
(interactive)
|
||||
(consult-line (thing-at-point 'symbol)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/backward-updir ()
|
||||
(defun +vertico/backward-updir ()
|
||||
"Delete char before or go up directory for file cagetory vertico buffers."
|
||||
(interactive)
|
||||
(let ((metadata (completion-metadata (minibuffer-contents)
|
||||
|
@ -94,7 +94,7 @@ If ARG (universal argument), include all files, even hidden or compressed ones."
|
|||
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/embark-export-write ()
|
||||
(defun +vertico/embark-export-write ()
|
||||
"Export the current vertico results to a writable buffer if possible.
|
||||
|
||||
Supports exporting consult-grep to wgrep, file to wdeired, and consult-location to occur-edit"
|
||||
|
@ -112,7 +112,7 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
|
|||
(x (user-error "embark category %S doesn't support writable export" x)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/embark-preview ()
|
||||
(defun +vertico/embark-preview ()
|
||||
"Previews candidate in vertico buffer, unless it's a consult command"
|
||||
(interactive)
|
||||
(unless (bound-and-true-p consult--preview-function)
|
||||
|
@ -121,15 +121,15 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
|
|||
(embark-default-action)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/next-candidate-preview ()
|
||||
(defun +vertico/next-candidate-preview ()
|
||||
"Move to next candidate and preivew it"
|
||||
(interactive)
|
||||
(vertico-next)
|
||||
(+selectrum/embark-preview))
|
||||
(+vertico/embark-preview))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum/previous-candidate-preview ()
|
||||
(defun +vertico/previous-candidate-preview ()
|
||||
"Move to previous candidate and preview it"
|
||||
(interactive)
|
||||
(vertico-previous)
|
||||
(+selectrum/embark-preview))
|
||||
(+vertico/embark-preview))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;;###if (featurep! :ui workspaces)
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum--workspace-nth-source (n)
|
||||
(defun +vertico--workspace-nth-source (n)
|
||||
"Generate a consult buffer source for buffers in the NTH workspace"
|
||||
(cond ((numberp n)
|
||||
`(:name ,(nth n (+workspace-list-names))
|
||||
|
@ -22,19 +22,19 @@
|
|||
(user-error "invalid workspace source %s" n))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum--workspace-generate-sources ()
|
||||
(defun +vertico--workspace-generate-sources ()
|
||||
"Generate list of consult buffer sources for all workspaces"
|
||||
(mapcar #'+selectrum--workspace-nth-source '(0 1 2 3 4 5 6 7 8 final)))
|
||||
(mapcar #'+vertico--workspace-nth-source '(0 1 2 3 4 5 6 7 8 final)))
|
||||
|
||||
(autoload 'consult--multi "consult")
|
||||
;;;###autoload
|
||||
(defun +selectrum/switch-workspace-buffer ()
|
||||
(defun +vertico/switch-workspace-buffer ()
|
||||
"Switch to another buffer in the same workspace.
|
||||
|
||||
Use consult narrowing with another workspace number to open a buffer from that workspace
|
||||
BUG but it opens it in the current workspace (ivy also does this, but who cares)"
|
||||
(interactive)
|
||||
(when-let (buffer (consult--multi (+selectrum--workspace-generate-sources)
|
||||
(when-let (buffer (consult--multi (+vertico--workspace-generate-sources)
|
||||
:require-match
|
||||
(confirm-nonexistent-file-or-buffer)
|
||||
:prompt (format "Switch to buffer (%s): "
|
||||
|
@ -47,7 +47,7 @@ Use consult narrowing with another workspace number to open a buffer from that w
|
|||
(funcall consult--buffer-display (car buffer)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum-embark-open-in-new-workspace (x)
|
||||
(defun +vertico-embark-open-in-new-workspace (x)
|
||||
"Open X (a file) in a new workspace."
|
||||
(+workspace/new)
|
||||
(find-file x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue