lsp-ui icon indicating copy to clipboard operation
lsp-ui copied to clipboard

Add global entry

Open jcs090218 opened this issue 3 years ago • 3 comments

For #625.

Not sure if this is a good idea, but I have implemented first.

jcs090218 avatar Jun 17 '21 05:06 jcs090218

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)))

jcs090218 avatar Jun 18 '21 05:06 jcs090218

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?

yyoncho avatar Jun 18 '21 05:06 yyoncho

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)

jcs090218 avatar Jun 18 '21 05:06 jcs090218