aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_editor.lua
diff options
context:
space:
mode:
authorjdrouhard <john@drouhard.dev>2025-12-16 21:06:55 -0600
committerGitHub <noreply@github.com>2025-12-16 22:06:55 -0500
commit8a94daf80eadbd9179768fe3d7da2f06c81dc740 (patch)
treee7849cb30b9ad41d0495104c95592f65230ef7d2 /runtime/lua/vim/_editor.lua
parent5c22feac06aeb85ef3e17d6780478dd5e9a7c85d (diff)
downloadrneovim-8a94daf80eadbd9179768fe3d7da2f06c81dc740.tar.gz
rneovim-8a94daf80eadbd9179768fe3d7da2f06c81dc740.tar.bz2
rneovim-8a94daf80eadbd9179768fe3d7da2f06c81dc740.zip
fix(lsp): simplify semantic tokens range request logic #36950
By simplifying the way range is supported, we can fix a couple issues as well as making it less complex and more efficient: * For non-range LSP servers, don't send requests on WinScrolled. The semantic tokens module has been reworked to only send one active request at a time, as it was before range support was added. If range is not supported, then send_request() only fires if there's been a change to the buffer's document version. * Cache the server's support of range and delta requests when attaching to a buffer to save the lookup on each request. * Range requests always use the visible window, so just use that for the `range` param when sending requests when range is supported by the server. This reduces the API surface area of send_request(). * Debounce the WinScrolled autocmd requests in the same the way requests are debounced when the buffer contents are changing. Should allow scrolling via mouse wheel or holding down "j" or "k" work a bit smoother. The previous iteration of range support allowed multiple active requests to be in progress simultaneously. However, a bug was preventing any but the most recent request to actually apply to the client's highlighting state so that complexity was unused. It was effectively only using one active request at a time but was just using range requests on WinScrolled events instead of a full (or delta) request when the document version changed.
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
0 files changed, 0 insertions, 0 deletions