Add a very basic embark support

This commit is contained in:
Sameer Rahmani 2024-05-07 14:13:02 +01:00
parent aeb4f1a6a2
commit 31271e90fc
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
4 changed files with 39 additions and 5 deletions

View File

@ -44,6 +44,7 @@ let
beacon
hydra
rg
embark
]);
drv = makeFG42Drv {

View File

@ -41,13 +41,39 @@
(set-face-attribute 'default t :font name)))
(use! origami
"A text folding minor mode for Emacs."
(use! embark
"Emacs Mini-Buffer Actions Rooted in Keymaps."
:bind
(("C-c TAB" . origami-toggle-node))
(("C--" . embark-act) ;; pick some comfortable binding
("C-;" . embark-dwim) ;; good alternative: M-.
("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
:init
;; Optionally replace the key help with a completing-read interface
(setq prefix-help-command #'embark-prefix-help-command)
;; Show the Embark target at point via Eldoc. You may adjust the
;; Eldoc strategy, if you want to see the documentation from
;; multiple providers. Beware that using this can be a little
;; jarring since the message shown in the minibuffer can be more
;; than one line, causing the modeline to move up and down:
;; (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
:config
(global-origami-mode t))
;; Hide the mode line of the Embark live/completions buffers
(add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
(use! origami
"A text folding minor mode for Emacs."
:bind
(("C-c TAB" . origami-toggle-node))
:config
(global-origami-mode t))
(use! rg

View File

@ -31,6 +31,7 @@ let
ctrlf
consult
marginalia
embark-consult
] ++ lib.optionals (cfg.floating) [
vertico-posframe
]);

View File

@ -204,6 +204,12 @@ match all of the components in any order."
:bind (("M-g e" . consult-compile-error))))
(use! embark-consult
"Embark integration for consult"
:hook
(embark-collect-mode . consult-preview-at-point-mode))
(with-config "graphics"
(use! nerd-icons-completion
"Nerd icons in marginalia"