lsp-ui
lsp-ui copied to clipboard
Add global entry
For #625.
Not sure if this is a good idea, but I have implemented first.
for the enable we have to look for all buffers in lsp-mode state.
No, I think the global minor mode will handles this? But the flag would not disable since it's defcustom
.
(define-global-minor-mode global-lsp-ui-doc-mode lsp-ui-doc-mode
(lambda () (lsp-ui-doc-mode 1)))
Ok, seems like the global mode will handle the turnoff. Don't we need also to set lsp-ui-doc-enable to nil to avoid starting ui-doc in the new buffers?
Ok, seems like the global mode will handle the turnoff. Don't we need also to set lsp-ui-doc-enable to nil to avoid starting ui-doc in the new buffers?
No, I think the minor-mode will still enable if user have set it up in the config. For instance,
(global-lsp-ui-doc-mode 1)
Then it will automatically be turn on no matter what, and I think that's the default action from Emacs. If user want to disable lsp-ui completely then it will have to evaluate expression manually.
(setq lsp-ui-doc-enable nil)