|
|
@ -569,48 +569,27 @@ Exclude some dirs from spamming recentf |
|
|
|
"q" '(imenu-list-quit-window :which-key "quit")) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* Selectrum & Co. |
|
|
|
Uses default features of emacs instead of bringing a new framework in like helm or counsel |
|
|
|
* Vertico & Orderless |
|
|
|
Vertico is a completion ui. |
|
|
|
Orderless orders the suggestions by recency. The package prescient orders by frequency. |
|
|
|
[[https://github.com/minad/vertico][Vertico Github]] |
|
|
|
[[https://github.com/oantolin/orderless][Orderless Github]] |
|
|
|
#+begin_src emacs-lisp |
|
|
|
;; either selectrum or vertico |
|
|
|
(use-package selectrum |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(selectrum-mode) |
|
|
|
) |
|
|
|
|
|
|
|
;; as of 2021-10-29 debian emacs 27.1 seems to cause error |
|
|
|
;; error in post-command-hook (vertico--exhibit): (wrong-type-argument .....) |
|
|
|
;; see https://github.com/minad/vertico/issues/41 |
|
|
|
;(use-package vertico |
|
|
|
; :ensure t |
|
|
|
; :init |
|
|
|
; (vertico-mode)) |
|
|
|
;; completion ui |
|
|
|
(use-package vertico |
|
|
|
:init |
|
|
|
(vertico-mode)) |
|
|
|
|
|
|
|
;; orderless orders by recency |
|
|
|
;; prescient orders by frequency |
|
|
|
;; both combined order by frecency (most recent first, then by frequency, then by length) |
|
|
|
(use-package orderless |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
;; optional performance optimizaion |
|
|
|
;; by highlighting only visible candidates |
|
|
|
(setq orderless-skip-highlighting (lambda () selectrum-is-active) |
|
|
|
selectrum-highlight-candidates-function #'orderless-highlight-matches |
|
|
|
:init |
|
|
|
(setq completion-styles '(orderless basic) |
|
|
|
completion-category-defaults nil |
|
|
|
completion-category-overrides '((file (styles . (partial-completion))))) |
|
|
|
:custom |
|
|
|
(completion-styles '(orderless)) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package selectrum-prescient |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(setq selectrum-prescient-enable-filtering nil) ; only if used with orderless |
|
|
|
(selectrum-prescient-mode) |
|
|
|
(prescient-persist-mode) |
|
|
|
) |
|
|
|
completion-category-overrides '((file (styles partial-completion))))) |
|
|
|
#+end_src |
|
|
|
* Consult |
|
|
|
[[https://github.com/minad/consult][Github]] |
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package consult |
|
|
|
:ensure t |
|
|
|
:bind |
|
|
@ -627,22 +606,29 @@ Uses default features of emacs instead of bringing a new framework in like helm |
|
|
|
consult-ripgrep consult-git-grep consult-grep |
|
|
|
consult-bookmark consult-recent-file consult-xref |
|
|
|
consult--source-file consult--source-project-file consult--source-bookmark |
|
|
|
:preview-key (kbd "M-.")) |
|
|
|
) |
|
|
|
|
|
|
|
;; shows descriptions in M-x |
|
|
|
:preview-key (kbd "M-."))) |
|
|
|
#+end_src |
|
|
|
* Marginalia |
|
|
|
[[https://github.com/minad/marginalia/][Github]] |
|
|
|
Adds additional information to the minibuffer |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package marginalia |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
:init |
|
|
|
(marginalia-mode) |
|
|
|
:bind |
|
|
|
(:map minibuffer-local-map |
|
|
|
("M-A" . marginalia-cycle)) |
|
|
|
:custom |
|
|
|
;; switch by 'marginalia-cycle |
|
|
|
(marginalia-annotators '(marginalia-annotators-heavy |
|
|
|
marginalia-annotators-light |
|
|
|
nil)) |
|
|
|
) |
|
|
|
nil))) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
;; do stuff on minibuffer results |
|
|
|
* Embark |
|
|
|
Does stuff in the minibuffer results |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package embark |
|
|
|
:ensure t |
|
|
|
:bind |
|
|
@ -651,29 +637,11 @@ Uses default features of emacs instead of bringing a new framework in like helm |
|
|
|
:init |
|
|
|
(setq prefix-help-command #'embark-prefix-help-command) |
|
|
|
:config |
|
|
|
;; for selectrum |
|
|
|
;; (defun current-candidate+category () |
|
|
|
;; (when selectrum-is-active |
|
|
|
;; (cons (selectrum--get-meta 'category) |
|
|
|
;; (selectrum-get-current-candidate)))) |
|
|
|
;; (add-hook 'embark-target-finders #'current-candidate+category) |
|
|
|
|
|
|
|
;; (defun current-candidates+category () |
|
|
|
;; (when selectrum-is-active |
|
|
|
;; (cons (selectrum--get-meta 'category) |
|
|
|
;; (selectrum-get-current-candidates |
|
|
|
;; ;; pass relative file names for dired. |
|
|
|
;; minibuffer-completing-file-name)))) |
|
|
|
;; (add-hook 'embark-candidate-collectors #'current-candidates+category) |
|
|
|
|
|
|
|
;; ;; no unnecessary computation delay after injection. |
|
|
|
;; (add-hook 'embark-setup-hook 'selectrum-set-selected-candidate) |
|
|
|
;; hide modeline of the embark live/completions buffers |
|
|
|
(add-to-list 'display-buffer-alist |
|
|
|
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" |
|
|
|
nil |
|
|
|
(window-parameters (mode-line-format . none)))) |
|
|
|
) |
|
|
|
(window-parameters (mode-line-format . none))))) |
|
|
|
|
|
|
|
(use-package embark-consult |
|
|
|
:ensure t |
|
|
@ -685,7 +653,7 @@ Uses default features of emacs instead of bringing a new framework in like helm |
|
|
|
|
|
|
|
* Helm |
|
|
|
As an alternative if I'm not happy with selectrum & co |
|
|
|
#+begin_src emacs-lisp |
|
|
|
begin_src emacs-lisp |
|
|
|
(use-package helm |
|
|
|
:ensure t |
|
|
|
:hook |
|
|
@ -707,7 +675,7 @@ As an alternative if I'm not happy with selectrum & co |
|
|
|
(helm-autoresize-max-height 20) |
|
|
|
(helm-autoresize-min-height 5) |
|
|
|
) |
|
|
|
#+end_src |
|
|
|
end_src |
|
|
|
|
|
|
|
* ivy / counsel / swiper |
|
|
|
:PROPERTIES: |
|
|
@ -1074,6 +1042,8 @@ Customize the org agenda |
|
|
|
|
|
|
|
** *TODO* |
|
|
|
org-super-agenda |
|
|
|
[[https://github.com/alphapapa/org-ql][org-ql]] |
|
|
|
[[https://github.com/nobiot/org-transclusion][org-transclusion]]? |
|
|
|
|
|
|
|
** org-caldav |
|
|
|
:PROPERTIES: |
|
|
@ -1096,6 +1066,7 @@ Vorerst deaktiviert, Nutzen evtl. nicht vorhanden |
|
|
|
:END: |
|
|
|
[[https://github.com/bastibe/org-journal][Source]] |
|
|
|
|
|
|
|
Ggf. durch org-roam-journal ersetzen |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package org-journal |
|
|
|
:if *sys/linux* |
|
|
@ -1109,6 +1080,34 @@ Vorerst deaktiviert, Nutzen evtl. nicht vorhanden |
|
|
|
org-journal-enable-agenda-integration t))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** org-roam |
|
|
|
Um Headings innerhalb einer Datei zu verlinken: |
|
|
|
- org-id-get-create im Heading, |
|
|
|
- org-roam-node-insert in der verweisenden Datei |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package org-roam |
|
|
|
:ensure t |
|
|
|
:init |
|
|
|
(setq org-roam-v2-ack t) |
|
|
|
:custom |
|
|
|
(org-roam-directory "~/RoamNotes") |
|
|
|
(org-roam-completion-everywhere t) |
|
|
|
:bind (("C-c n l" . org-roam-buffer-toggle) |
|
|
|
("C-c n f" . org-roam-node-find) |
|
|
|
("C-c n i" . org-roam-node-insert) |
|
|
|
:map org-mode-map |
|
|
|
("C-M-i" . completion-at-point) |
|
|
|
:map org-roam-dailies-map |
|
|
|
("Y" . org-roam-dailies-capture-yesterday) |
|
|
|
("T" . org-roam-dailies-capture-tomorrow)) |
|
|
|
:bind-keymap |
|
|
|
("C-c n d" . org-roam-dailies-map) |
|
|
|
:config |
|
|
|
(require 'org-roam-dailies) ;; ensure the keymap is available |
|
|
|
(org-roam-db-autosync-mode)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* Programming |
|
|
|
** misc |
|
|
|
#+begin_src emacs-lisp |
|
|
|