diff --git a/emacs/init.org b/emacs/init.org index e7c5f49..5258f18 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4859,7 +4859,15 @@ Get a nice IMenu sidebar: (imenu-list-major-mode-map "SPC" leader-map) (imenu-list-major-mode-map "." #'imenu-list-display-entry)) - (leader-def-key "\\" #'imenu-list-smart-toggle) + (defun open-imenu-list () + (interactive) + (if (and (fboundp 'lsp-ui-imenu) + (boundp 'lsp-mode) + lsp-mode) + (lsp-ui-imenu) + (imenu-list-smart-toggle))) + + (leader-def-key "\\" #'open-imenu-list) (leader-def-key "m" #'imenu) #+END_SRC