From c8651f669b9ec5cd4ae8588c5230d28895f9fdc3 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Wed, 1 Oct 2025 17:44:46 +0100 Subject: Add Eglot key-bindings & enable on c/c++ modes --- emacs-config.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/emacs-config.org b/emacs-config.org index 168f263..7be6d69 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -1410,6 +1410,22 @@ Add version control next action shortcut in diff-mode buffer. (keymap-set diff-mode-map "v" #'vc-next-action)) #+end_src +** Eglot +Configure eglot. +#+begin_src elisp + (with-eval-after-load 'eglot + (keymap-set eglot-mode-map "C-c e a" #'eglot-code-actions) + (keymap-set eglot-mode-map "C-c e e" #'eglot-code-actions) + (keymap-set eglot-mode-map "C-c e f" #'eglot-format) + (keymap-set eglot-mode-map "C-c e r" #'eglot-rename)) +#+end_src + +Enable eglot for certain modes. +#+begin_src elisp + (add-hook 'c-mode-hook #'eglot-ensure) + (add-hook 'c++-mode-hook #'eglot-ensure) +#+end_src + * Global Keybindings Unlock previously unusable keybinding. #+begin_src elisp -- cgit