Compare commits

..

No commits in common. "be797826ec57f63372eb22cd2b57cf7f832a8c6f" and "b541e076e0564b6da631d68fdbd3df91e259efbc" have entirely different histories.

3 changed files with 8 additions and 72 deletions

View File

@ -24,71 +24,19 @@
(advice-add #'marginalia-cycle :after (advice-add #'marginalia-cycle :after
(lambda () (lambda ()
(when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))) (when (bound-and-true-p selectrum-mode) (selectrum-exhibit))))
(add-to-list 'marginalia-prompt-categories '("Find file:" . project-file))
(add-to-list 'marginalia-prompt-categories '("Find dir:" . project-file))
(add-to-list 'marginalia-prompt-categories '("Switch to project" . file))
(add-to-list 'marginalia-prompt-categories '("recipe\\|package" . straight))
(add-to-list 'marginalia-prompt-categories '("Password entry" . password-store))
:general :general
(minibuffer-local-map "M-A" #'marginalia-cycle) (minibuffer-local-map "M-A" #'marginalia-cycle)
:custom :custom
(marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))) (marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil)))
;; Embark adds context actions to completion candidates (and other things!) ;; Embark adds context actions to completion candidates
(use-package embark (use-package embark
:config :config
(defun embark-which-key-indicator () (defun embark-which-key-indicator (map _target)
"An embark indicator that displays keymaps using which-key. (which-key--show-keymap "Embark" map nil nil 'no-paging)
The which-key help message will show the type and value of the #'which-key--hide-popup-ignore-command)
current target followed by an ellipsis if there are further
targets."
(lambda (&optional keymap targets prefix)
(if (null keymap)
(which-key--hide-popup-ignore-command)
(which-key--show-keymap
(if (eq (caar targets) 'embark-become)
"Become"
(format "Act on %s '%s'%s"
(plist-get (car targets) :type)
(embark--truncate-target (plist-get (car targets) :target))
(if (cdr targets) "" "")))
(if prefix
(pcase (lookup-key keymap prefix 'accept-default)
((and (pred keymapp) km) km)
(_ (key-binding prefix 'accept-default)))
keymap)
nil nil t))))
(embark-define-keymap embark-straight-map
"Keymap for actions for straight.el"
("u" straight-visit-package-website)
("r" straight-get-recipe)
("i" straight-use-package)
("c" straight-check-package)
("F" straight-pull-package)
("f" straight-fetch-package)
("p" straight-push-package)
("n" straight-normalize-package)
("m" straight-merge-package))
(add-to-list 'embark-keymap-alist '(straight . embark-straight-map))
(embark-define-keymap embark-password-store-actions
"Keymap for actions for password-store."
("c" password-store-copy)
("f" password-store-copy-field)
("i" password-store-insert)
("I" password-store-generate)
("r" password-store-rename)
("e" password-store-edit)
("k" password-store-remove)
("U" password-store-url))
(add-to-list 'embark-keymap-alist '(password-store . embark-password-store-actions))
:general :general
("C-." #'embark-act) ("M-o" #'embark-act)
("M-." #'embark-dwim)
('normal "C-." #'embark-act)
('normal "M-." #'embark-dwim)
(embark-file-map "s" #'sudo-edit-find-file
"l" #'vlf
"g" #'magit-file-dispatch)
('normal embark-collect-mode-map ('normal embark-collect-mode-map
"TAB" #'forward-button "TAB" #'forward-button
"?" #'describe-mode "?" #'describe-mode
@ -110,9 +58,7 @@ targets."
"<backtab>" #'backward-button) "<backtab>" #'backward-button)
:custom :custom
(embark-prompter 'embark-keymap-prompter) (embark-prompter 'embark-keymap-prompter)
(embark-indicators '(embark-which-key-indicator (embark-indicator 'embark-which-key-indicator))
embark-highlight-indicator
embark-isearch-highlight-indicator)))
;; Consult adds a bunch of completing-read based utilities ;; Consult adds a bunch of completing-read based utilities
(use-package consult (use-package consult

View File

@ -23,14 +23,6 @@
(set-visited-file-name new-name) (set-visited-file-name new-name)
(set-buffer-modified-p nil)) (set-buffer-modified-p nil))
(use-package sudo-edit
:commands (sudo-edit
sudo-edit-find-file))
;; Optimized editing of very large files
(use-package vlf
:commands (vlf))
(leader-def-key (leader-def-key
"f" '(nil :which-key "file") "f" '(nil :which-key "file")
"ff" #'find-file "ff" #'find-file

View File

@ -1,8 +1,7 @@
;; The all-powerful Org mode ;; The all-powerful Org mode
(use-package org (use-package org
:straight '(org-plus-contrib :type git :straight org-plus-contrib
:repo "https://git.sr.ht/~bzg/org-contrib")
:mode (("\\.org\\'" . org-mode)) :mode (("\\.org\\'" . org-mode))
:init :init
(leader-def-key "o" '(nil :which-key "org")) (leader-def-key "o" '(nil :which-key "org"))
@ -132,8 +131,7 @@
"I" #'org-roam-node-insert-immediate) "I" #'org-roam-node-insert-immediate)
(with-eval-after-load 'org (with-eval-after-load 'org
(general-def org-mode-map "C-c n" org-roam-commands-map) (general-def org-mode-map "C-c n" org-roam-commands-map)
;; (which-key-declare-prefixes-for-mode 'org-mode "C-c n" "org-roam") (which-key-declare-prefixes-for-mode 'org-mode "C-c n" "org-roam"))
)
:general :general
(leader-map "of" #'org-roam-node-find) (leader-map "of" #'org-roam-node-find)
:config :config