Add global entry - #626
Conversation
yyoncho
left a comment
There was a problem hiding this comment.
Don't we need something like this?
(defun lsp-ui-doc-disable (args)
"..."
(interactive "P")
(setq lsp-ui-doc-enable nil)
(mapc (lambda (b) (with-current-buffer b
(lsp-ui-doc-mode -1)))
(buffer-list)))
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 (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? |
| (lsp-ui-doc--callback (lsp-request "textDocument/hover" (lsp--text-document-position-params)) | ||
| (or (bounds-of-thing-at-point 'symbol) (cons (point) (1+ (point)))) | ||
| (current-buffer))) | ||
| (when lsp-ui-doc-mode |
There was a problem hiding this comment.
this will prevent the user from using ui-doc without enabling lsp-ui-doc, right? I think this is the goal of lsp-ui-doc-show
There was a problem hiding this comment.
I think it make sense it shows only when the lsp-ui-doc is enabled. So yes.
There was a problem hiding this comment.
The idea of lsp-ui-doc-show is to be used when automatic lsp-ui-doc is off. This change will allow showing the doc manually only when the automatic popup is enabled which does not make sense.
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) |
For #625.
Not sure if this is a good idea, but I have implemented first.