summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-06-24 19:40:33 +0200
committerAlan Pearce2023-06-24 20:01:25 +0200
commitb3789db3412620f0a00f99b5863768320e9e9291 (patch)
tree9c8b055c62c67e7cadab5064c4d04d563e963486
parent9ca99679f2f9f05c33d6fc03aac725f30d2e416a (diff)
downloadnixfiles-b3789db3412620f0a00f99b5863768320e9e9291.tar.lz
nixfiles-b3789db3412620f0a00f99b5863768320e9e9291.tar.zst
nixfiles-b3789db3412620f0a00f99b5863768320e9e9291.zip
Emacs: set up embark and its consult integration
-rw-r--r--user/emacs/init.el14
-rw-r--r--user/settings/emacs.nix2
2 files changed, 16 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index e34df4ca..488d3510 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -249,6 +249,20 @@ With two prefix arguments, write out the day and month name."
             (setq consult-ripgrep-args
                   "rg --null --line-buffered --color=never --max-columns=1000 --path-separator /   --smart-case --no-heading --with-filename --line-number --search-zip --follow")))
 
+(use-package embark
+  :general ("C-." #'embark-act
+            "M-." #'embark-dwim
+            "C-h B" #'embark-bindings)
+  :config (progn
+            (setq embark-prompter #'embark-completing-read-prompter)
+            (add-to-list 'display-buffer-alist
+                         '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
+                           nil
+                           (window-parameters (mode-line-format . none))))))
+
+(use-package embark-consult
+  :ghook ('consult-preview-at-point-mode-hook #'embark-collect-mode))
+
 (use-package smerge-mode
   :after magit
   :config
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index db83453f..ad02242d 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -116,6 +116,8 @@ in
         eglot
         eldoc-box
         emacs-gc-stats
+        embark
+        embark-consult
         esh-buf-stack
         esh-help
         eshell-fringe-status