Skip to content

Improve lsp semanticTokens range highlighting

Waqar Ahmed requested to merge work/semhi-optimize into master

Currently we debounce whenever the user scrolls the view. This results in flickering sometimes, especially if the server is not very fast the flickering can be annoying.

With this change, we optimize in a different way:

  • Request highlighting for a bigger range than the current view range
  • If the user scrolls, ignore it if the current highlighted range contains the scrolled region otherwise request new highlights immediately

This results in a much better user experience in my opinion.

Merge request reports