From fdebdb093233ec72932fd4b1e3bcfd03a87113de Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 26 Jan 2025 14:21:17 -0500 Subject: [PATCH] turn off automatic lsp toolips, switch to be triggered via keybind i'm only doing this because in non-graphical mode, lsp tooltips seem to have some weird issues, sometimes not working at all, sometimes resulting in "error while displaying tooltip" messages. switching them to be triggered on-demand via keybind seems to resolve all of this ... for now anyway --- emacs.d/lsp.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/emacs.d/lsp.el b/emacs.d/lsp.el index 160307e..7548017 100644 --- a/emacs.d/lsp.el +++ b/emacs.d/lsp.el @@ -18,6 +18,10 @@ (remove-hook 'prog-mode-hook 'lsp-non-interactive) (message "Removing lsp hook from prog-modes")) +(defun gered/show-doc-at-point () + (interactive) + (if lsp-mode (lsp-ui-doc-glance))) + (use-package lsp-mode :ensure t :init @@ -44,9 +48,13 @@ (use-package lsp-ui :ensure t + :config + (setq lsp-ui-doc-enable nil) :commands lsp-ui) (use-package lsp-treemacs :ensure t :after lsp-mode :commands lsp-treemacs-errors-list) + +(global-set-key (kbd "M-i") #'gered/show-doc-at-point)