Compare commits
No commits in common. "be797826ec57f63372eb22cd2b57cf7f832a8c6f" and "b541e076e0564b6da631d68fdbd3df91e259efbc" have entirely different histories.
be797826ec
...
b541e076e0
@ -24,71 +24,19 @@
|
||||
(advice-add #'marginalia-cycle :after
|
||||
(lambda ()
|
||||
(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
|
||||
(minibuffer-local-map "M-A" #'marginalia-cycle)
|
||||
:custom
|
||||
(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
|
||||
:config
|
||||
(defun embark-which-key-indicator ()
|
||||
"An embark indicator that displays keymaps using which-key.
|
||||
The which-key help message will show the type and value of the
|
||||
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))
|
||||
(defun embark-which-key-indicator (map _target)
|
||||
(which-key--show-keymap "Embark" map nil nil 'no-paging)
|
||||
#'which-key--hide-popup-ignore-command)
|
||||
:general
|
||||
("C-." #'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)
|
||||
("M-o" #'embark-act)
|
||||
('normal embark-collect-mode-map
|
||||
"TAB" #'forward-button
|
||||
"?" #'describe-mode
|
||||
@ -110,9 +58,7 @@ targets."
|
||||
"<backtab>" #'backward-button)
|
||||
:custom
|
||||
(embark-prompter 'embark-keymap-prompter)
|
||||
(embark-indicators '(embark-which-key-indicator
|
||||
embark-highlight-indicator
|
||||
embark-isearch-highlight-indicator)))
|
||||
(embark-indicator 'embark-which-key-indicator))
|
||||
|
||||
;; Consult adds a bunch of completing-read based utilities
|
||||
(use-package consult
|
||||
|
@ -23,14 +23,6 @@
|
||||
(set-visited-file-name new-name)
|
||||
(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
|
||||
"f" '(nil :which-key "file")
|
||||
"ff" #'find-file
|
||||
|
@ -1,8 +1,7 @@
|
||||
;; The all-powerful Org mode
|
||||
|
||||
(use-package org
|
||||
:straight '(org-plus-contrib :type git
|
||||
:repo "https://git.sr.ht/~bzg/org-contrib")
|
||||
:straight org-plus-contrib
|
||||
:mode (("\\.org\\'" . org-mode))
|
||||
:init
|
||||
(leader-def-key "o" '(nil :which-key "org"))
|
||||
@ -132,8 +131,7 @@
|
||||
"I" #'org-roam-node-insert-immediate)
|
||||
(with-eval-after-load 'org
|
||||
(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
|
||||
(leader-map "of" #'org-roam-node-find)
|
||||
:config
|
||||
|
Loading…
Reference in New Issue
Block a user