Add some Embark stuff
This commit is contained in:
parent
a5e9144d63
commit
5d09db86a0
21
init.el
21
init.el
@ -737,7 +737,26 @@ visual states."
|
||||
("b" . consult-buffer)
|
||||
("B" . switch-to-buffer))
|
||||
:init
|
||||
(setq embark-quit-after-action nil)
|
||||
(setq embark-quit-after-action nil
|
||||
embark-indicators '(embark-minimal-indicator
|
||||
embark-isearch-highlight-indicator
|
||||
embark-highlight-indicator))
|
||||
(defvar-keymap my/embark-string-map
|
||||
:doc "Keymap for Embark string actions."
|
||||
:parent embark-expression-map
|
||||
"R" 'repunctuate-sentences)
|
||||
(defun my/embark-target-string ()
|
||||
"Target the string at point."
|
||||
(if-let (((not (eobp))) ; prevent next line from causing errors
|
||||
(bounds (bounds-of-thing-at-point 'string)))
|
||||
(append (list 'string (buffer-substring-no-properties (car bounds)
|
||||
(cdr bounds)))
|
||||
bounds)))
|
||||
(add-to-list 'embark-around-action-hooks
|
||||
'(repunctuate-sentences embark--mark-target))
|
||||
(add-to-list 'embark-keymap-alist
|
||||
'(string my/embark-string-map))
|
||||
(add-to-list 'embark-target-finders 'my/embark-target-string)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||
nil
|
||||
|
Loading…
Reference in New Issue
Block a user