diff options
Diffstat (limited to 'user/emacs')
-rw-r--r-- | user/emacs/init.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index c72b3082..03f42eda 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -1045,6 +1045,10 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve (defvaralias 'nix-ts-mode-hook 'nix-mode-hook) +(use-package consult-lsp + :commands (consult-lsp-symbols + consult-lsp-diagnostics)) + (use-package eglot :defer 3 :general (:states 'normal :keymaps 'eglot-mode-map @@ -1142,6 +1146,12 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve (call-interactively #'lsp-rename) (call-interactively #'eglot-rename))) +(defun my/ls-consult-symbol () + (interactive) + (if lsp-mode + (call-interactively #'consult-lsp-symbols) + (call-interactively #'consult-eglot-symbols))) + ;; Inside a javascript project, it's common to install tools locally to ;; the project. This will allows emacs to find their executables. @@ -1199,7 +1209,7 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve "w" '(:keymap evil-window-map :package evil) "x" '(:keymap ctl-x-map) "c" (general-simulate-key "C-c") - "j" #'consult-eglot-symbols + "j" #'my/ls-consult-symbol "r" #'my/ls-rename "q" #'evil-delete-buffer "p" '(:keymap project-prefix-map :package project) |