Move completion related configuration to its own section
This commit is contained in:
parent
3539accfb1
commit
c058cfe853
@ -1898,6 +1898,137 @@ It also provides some nice commands to navigate between change sets.
|
|||||||
(([f6] . git-timemachine-toggle)))
|
(([f6] . git-timemachine-toggle)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Completion related external packages
|
||||||
|
|
||||||
|
** ~vertico~
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package vertico
|
||||||
|
:init
|
||||||
|
(vertico-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** ~consult~
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package consult
|
||||||
|
:bind (:map global-map
|
||||||
|
([remap Info-search] . consult-info)
|
||||||
|
("M-y" . consult-yank-pop)
|
||||||
|
:map mode-specific-map
|
||||||
|
("h" . consult-history)
|
||||||
|
("i" . consult-info)
|
||||||
|
("k" . consult-kmacro)
|
||||||
|
("m" . consult-man)
|
||||||
|
("M-x" . consult-mode-command)
|
||||||
|
:map ctl-x-map
|
||||||
|
("M-:" . consult-complex-command)
|
||||||
|
("4 b" . consult-buffer-other-window)
|
||||||
|
("5 b" . consult-buffer-other-frame)
|
||||||
|
("b" . consult-buffer)
|
||||||
|
("r b" . consult-bookmark)
|
||||||
|
("x b" . consult-project-buffer)
|
||||||
|
:map goto-map
|
||||||
|
("e" . consult-compile-error)
|
||||||
|
("f" . consult-flymake)
|
||||||
|
("g" . consult-goto-line)
|
||||||
|
("M-g" . consult-goto-line)
|
||||||
|
("i" . consult-imenu)
|
||||||
|
("I" . consult-imenu-multi)
|
||||||
|
("k" . consult-global-mark)
|
||||||
|
("m" . consult-mark)
|
||||||
|
("o" . consult-org-heading)
|
||||||
|
:map search-map
|
||||||
|
("d" . consult-find)
|
||||||
|
("D" . consult-locate)
|
||||||
|
("e" . consult-isearch-history)
|
||||||
|
("g" . consult-grep)
|
||||||
|
("G" . consult-git-grep)
|
||||||
|
("k" . consult-keep-lines)
|
||||||
|
("l" . consult-line)
|
||||||
|
("L" . consult-line-multi)
|
||||||
|
("r" . consult-ripgrep)
|
||||||
|
("u" . consilt-focus-lines)
|
||||||
|
:map isearch-mode-map
|
||||||
|
("M-e" . consult-isearch-history)
|
||||||
|
:map minibuffer-local-map
|
||||||
|
("M-s" . consult-history)
|
||||||
|
("M-r" . consult-history))
|
||||||
|
:hook
|
||||||
|
(completion-list-mode . consult-preview-at-point-mode)
|
||||||
|
:custom
|
||||||
|
(consult-narrow-key "<")
|
||||||
|
(consult-project-function (lambda (_) (projectile-project-root)))
|
||||||
|
(register-preview-delay 0.5)
|
||||||
|
(xref-show-xrefs-function #'consult-xref)
|
||||||
|
(xref-show-definitions-function #'consult-xref)
|
||||||
|
:init
|
||||||
|
(setq register-preview-function #'consult-register-format)
|
||||||
|
(advice-add #'register-preview :override #'consult-register-window)
|
||||||
|
:config
|
||||||
|
(defalias 'consult-line-thing-at-point 'consult-line)
|
||||||
|
(consult-customize
|
||||||
|
consult-theme :preview-key '(:debounce 0.2 any)
|
||||||
|
consult-buffer :preview-key "M-."
|
||||||
|
consult-line-thing-at-point :initial (thing-at-point 'symbol)
|
||||||
|
consult-ripgrep
|
||||||
|
consult-git-grep
|
||||||
|
consult-grep
|
||||||
|
consult-bookmark
|
||||||
|
consult-recent-file
|
||||||
|
consult-xref
|
||||||
|
consult--source-bookmark
|
||||||
|
consult--source-file-register
|
||||||
|
consult--source-recent-file
|
||||||
|
consult--source-project-recent-file
|
||||||
|
:preview-key '(:debounce 0.4 any))
|
||||||
|
(autoload 'projectile-project-root "projectile"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** ~orderless~
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package orderless
|
||||||
|
:init
|
||||||
|
(setq completion-category-defaults nil)
|
||||||
|
:custom
|
||||||
|
(completion-styles '(orderless basic))
|
||||||
|
(completion-category-overrides '((file (styles basic partial-completion)))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** ~marginalia~
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package marginalia
|
||||||
|
:bind (:map minibuffer-local-map
|
||||||
|
("M-A" . marginalia-cycle))
|
||||||
|
:init
|
||||||
|
(marginalia-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** ~embark~
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package embark
|
||||||
|
:bind (:map global-map
|
||||||
|
("C-." . embark-act))
|
||||||
|
:config
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||||
|
nil
|
||||||
|
(window-parameters (mode-line-format . none)))))
|
||||||
|
|
||||||
|
(use-package embark-consult
|
||||||
|
:hook
|
||||||
|
(embark-collect-mode . consult-preview-at-point-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** ~consult-projectile~
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package consult-projectile)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Org mode
|
* Org mode
|
||||||
|
|
||||||
** ~outline~
|
** ~outline~
|
||||||
@ -2771,139 +2902,6 @@ Because that’s still my favourite language.
|
|||||||
(org-msg-signature "\n\nBest,\n\n,#+begin_signature\n-- *Gergely Polonkai* \\\\\n,#+end_signature"))
|
(org-msg-signature "\n\nBest,\n\n,#+begin_signature\n-- *Gergely Polonkai* \\\\\n,#+end_signature"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Consult, Vertico, Orderless
|
|
||||||
|
|
||||||
The new completing system!
|
|
||||||
|
|
||||||
** Vertico
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package vertico
|
|
||||||
:init
|
|
||||||
(vertico-mode))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Consult
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package consult
|
|
||||||
:bind (:map global-map
|
|
||||||
([remap Info-search] . consult-info)
|
|
||||||
("M-y" . consult-yank-pop)
|
|
||||||
:map mode-specific-map
|
|
||||||
("M-x" . consult-mode-command)
|
|
||||||
("h" . consult-history)
|
|
||||||
("k" . consult-kmacro)
|
|
||||||
("m" . consult-man)
|
|
||||||
("i" . consult-info)
|
|
||||||
:map ctl-x-map
|
|
||||||
("M-:" . consult-complex-command)
|
|
||||||
("b" . consult-buffer)
|
|
||||||
("4 b" . consult-buffer-other-window)
|
|
||||||
("5 b" . consult-buffer-other-frame)
|
|
||||||
("r b" . consult-bookmark)
|
|
||||||
("x b" . consult-project-buffer)
|
|
||||||
:map goto-map
|
|
||||||
("e" . consult-compile-error)
|
|
||||||
("f" . consult-flymake)
|
|
||||||
("g" . consult-goto-line)
|
|
||||||
("M-g" . consult-goto-line)
|
|
||||||
("o" . consult-org-heading)
|
|
||||||
("m" . consult-mark)
|
|
||||||
("k" . consult-global-mark)
|
|
||||||
("i" . consult-imenu)
|
|
||||||
("I" . consult-imenu-multi)
|
|
||||||
:map search-map
|
|
||||||
("d" . consult-find)
|
|
||||||
("D" . consult-locate)
|
|
||||||
("g" . consult-grep)
|
|
||||||
("G" . consult-git-grep)
|
|
||||||
("r" . consult-ripgrep)
|
|
||||||
("l" . consult-line)
|
|
||||||
("L" . consult-line-multi)
|
|
||||||
("k" . consult-keep-lines)
|
|
||||||
("u" . consilt-focus-lines)
|
|
||||||
("e" . consult-isearch-history)
|
|
||||||
:map isearch-mode-map
|
|
||||||
("M-e" . consult-isearch-history)
|
|
||||||
:map minibuffer-local-map
|
|
||||||
("M-s" . consult-history)
|
|
||||||
("M-r" . consult-history))
|
|
||||||
:hook
|
|
||||||
(completion-list-mode . consult-preview-at-point-mode)
|
|
||||||
:custom
|
|
||||||
(consult-narrow-key "<")
|
|
||||||
(consult-project-function (lambda (_) (projectile-project-root)))
|
|
||||||
(register-preview-delay 0.5)
|
|
||||||
(xref-show-xrefs-function #'consult-xref)
|
|
||||||
(xref-show-definitions-function #'consult-xref)
|
|
||||||
:init
|
|
||||||
(setq register-preview-function #'consult-register-format)
|
|
||||||
(advice-add #'register-preview :override #'consult-register-window)
|
|
||||||
:config
|
|
||||||
(defalias 'consult-line-thing-at-point 'consult-line)
|
|
||||||
(consult-customize
|
|
||||||
consult-theme :preview-key '(:debounce 0.2 any)
|
|
||||||
consult-buffer :preview-key "M-."
|
|
||||||
consult-line-thing-at-point :initial (thing-at-point 'symbol)
|
|
||||||
consult-ripgrep
|
|
||||||
consult-git-grep
|
|
||||||
consult-grep
|
|
||||||
consult-bookmark
|
|
||||||
consult-recent-file
|
|
||||||
consult-xref
|
|
||||||
consult--source-bookmark
|
|
||||||
consult--source-file-register
|
|
||||||
consult--source-recent-file
|
|
||||||
consult--source-project-recent-file
|
|
||||||
:preview-key '(:debounce 0.4 any))
|
|
||||||
(autoload 'projectile-project-root "projectile"))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Orderless
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package orderless
|
|
||||||
:init
|
|
||||||
(setq completion-category-defaults nil)
|
|
||||||
:custom
|
|
||||||
(completion-styles '(orderless basic))
|
|
||||||
(completion-category-overrides '((file (styles basic partial-completion)))))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Marginalia
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package marginalia
|
|
||||||
:bind (:map minibuffer-local-map
|
|
||||||
("M-A" . marginalia-cycle))
|
|
||||||
:init
|
|
||||||
(marginalia-mode))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Embark
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package embark
|
|
||||||
:bind (:map global-map
|
|
||||||
("C-." . embark-act))
|
|
||||||
:config
|
|
||||||
(add-to-list 'display-buffer-alist
|
|
||||||
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
|
||||||
nil
|
|
||||||
(window-parameters (mode-line-format . none)))))
|
|
||||||
|
|
||||||
(use-package embark-consult
|
|
||||||
:hook
|
|
||||||
(embark-collect-mode . consult-preview-at-point-mode))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Projectile with Consult
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package consult-projectile)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Mode specific ~use-package~ calls
|
* Mode specific ~use-package~ calls
|
||||||
|
|
||||||
** JavaScript
|
** JavaScript
|
||||||
|
Loading…
Reference in New Issue
Block a user