summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index b559f843..b666e033 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1216,6 +1216,12 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
       (call-interactively #'consult-lsp-symbols)
     (call-interactively #'consult-eglot-symbols)))
 
+(defun my/ls-code-actions ()
+  (interactive)
+  (call-interactively
+   (if lsp-mode
+       #'lsp-execute-code-action
+     #'eglot-code-actions)))
 
 ;;;; Reformat on save
 
@@ -1270,6 +1276,7 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
   "s" #'treemacs-select-window
   "u" #'universal-argument
   ";" #'execute-extended-command
+  "a" #'my/ls-code-actions
   "bb" #'consult-buffer
   "bx" #'kill-this-buffer
   "br" #'revert-buffer