Closed leungbk closed 3 years ago
@leungbk Thanks !
@yyoncho lsp--capability
does not seem to be a function that return quickly, considering that lsp-ui-doc--handle-mouse-movement
will be call on every mouse movement.
Can the return value of (lsp--capability :hoverProvider)
changed during the session ?
Or we can cache it in a variable.
Or we could make that check in lsp-ui-doc--mouse-display
, when the idle timer is triggered
Can the return value of
(lsp--capability :hoverProvider)
changed during the session ? Or we can cache it in a variable.
It can if you have 2 servers connected to the buffer and kill one of them it might change. Not sure if we should be concerned about this case.
BTW it is better to use lsp-feature?
instead of lsp--capability
. lsp-feature?
can be optimized a lot as it is.
And one more case - I think that might lsp-ui will be initialized before the server has returned its capabilities.
@yyoncho Right, thanks !
@leungbk Can you move that check to lsp-ui-doc--mouse-display
.
lsp-ui-doc--handle-mouse-movement
should remains as fast as possible.
Thank you @leungbk
#