emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 139 forks source link

Add variable to control whether to wait for all symbols #509

Closed kurnevsky closed 3 years ago

kurnevsky commented 3 years ago

As described here https://github.com/emacs-lsp/lsp-ui/issues/171#issuecomment-691627065 cc @sebastiencs

sebastiencs commented 3 years ago

Thanks @kurnevsky. I don't have a server to test with slow responses, but if you move to a line, wait for the first item to show up, move the cursor on the right or left immediately, are the rest of the items displayed ?

My concern is that in lsp-ui-sideline--display-all-info there this condition:

  (when (and (eq (current-buffer) buffer)
             (equal tag (lsp-ui-sideline--calculate-tag))
             (not (lsp-ui-sideline--stop-p)))

The tag variable include (point), so if you move the cursor while waiting for some items to be displayed, they might never be displayed, since this condition will fail.

Can you confirm ?

kurnevsky commented 3 years ago

@sebastiencs yes, you are right. But it's happening even with lsp-ui-sideline-wait-for-all-symbols set to t (or without this change at all) - when I move cursor left or right before I receive all responses sideline isn't shown at all. So probably it should be fixed separately. I have lsp-ui-sideline-update-mode set to line.

sebastiencs commented 3 years ago

@kurnevsky Ah, right. I will fix that. Thanks !