From 6c28ba2313a15b61351fdf0a676adcecb4031189 Mon Sep 17 00:00:00 2001 From: noa@gaiwan.org Date: Sun, 23 Jun 2024 16:46:19 +0000 Subject: Remove embark configuration --- config.org | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/config.org b/config.org index a8cf88c..a47ce4d 100644 --- a/config.org +++ b/config.org @@ -442,41 +442,6 @@ These are some other almost default functions but with extra interactivity. (global-set-key [remap info] #'consult-info) #+end_src -** Embark: sort of like right click, but better -I've only recently started making use of embark and i definitely need to experiment with it more. Essentially it lets you execute actions based on what kind of thing is selected, either at the point in the buffer, or in an already open completion buffer. - -#+begin_src elisp - (package-ensure 'embark) - (package-ensure 'embark-consult) -#+end_src - -#+begin_src elisp -(global-set-key (kbd "C-") #'embark-act) -(global-set-key (kbd "C-") #'embark-export) -(global-set-key (kbd "M-.") #'embark-dwim) -#+end_src - -Embark indicators give us visual indication of what embark will do. The minimal indicator puts a message in the echo area. The highlight indicator highlights the region in the buffer that is being acted on. The isearch indicator does the same for when there are multiple regions to be acted on. If we want to see how we can act on the region, we can press C-h. - -#+begin_src elisp - (setopt embark-indicators '(embark-minimal-indicator - embark-highlight-indicator - embark-isearch-highlight-indicator)) -#+end_src - -As mentioned in the vertico configuration above, we can set vertico to use a different layout when completing different things. In this case, we set embark to take control of showing bindings help and of the prefix help, which is pressing C-h after pressing a prefix. Then we ensure we get a grid layout, so that we can see more commands on screen at a time. - -#+begin_src elisp - (global-set-key [remap describe-bindings] #'embark-bindings) - (setopt prefix-help-command #'embark-prefix-help-command) -#+end_src - -Because i use consult, it's recommended to set this up. - -#+begin_src elisp - (add-hook 'embark-collect-mode-hook #'consult-preview-at-point-mode) -#+end_src - ** Annotations for completing-read Marginalia provides us with annotations for candidates in completing read functions. This is things like docstrings for functions, file permissions in find-file, and so on. It's a small quality of life improvement. -- cgit 1.4.1-2-gfad0