diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-02-11 18:07:04 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-02-12 09:31:48 +0000 |
commit | 917172dd9680cc4234a47beee91e8adcaf0e833c (patch) | |
tree | f7b47a97bb4f1f533c4d67d3be2fc3265406ff5e /runtime/lua/vim/lsp/semantic_tokens.lua | |
parent | 4682f158a062dd8ede37c568c3e456aac83819fc (diff) | |
download | rneovim-917172dd9680cc4234a47beee91e8adcaf0e833c.tar.gz rneovim-917172dd9680cc4234a47beee91e8adcaf0e833c.tar.bz2 rneovim-917172dd9680cc4234a47beee91e8adcaf0e833c.zip |
fix(lsp): semantic token defer loading
Fixes #27424
Diffstat (limited to 'runtime/lua/vim/lsp/semantic_tokens.lua')
-rw-r--r-- | runtime/lua/vim/lsp/semantic_tokens.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/semantic_tokens.lua b/runtime/lua/vim/lsp/semantic_tokens.lua index b0cec0dd0e..fe8638bdfa 100644 --- a/runtime/lua/vim/lsp/semantic_tokens.lua +++ b/runtime/lua/vim/lsp/semantic_tokens.lua @@ -1,6 +1,5 @@ local api = vim.api local bit = require('bit') -local handlers = require('vim.lsp.handlers') local ms = require('vim.lsp.protocol').Methods local util = require('vim.lsp.util') local uv = vim.uv @@ -763,6 +762,7 @@ function M.highlight_token(token, bufnr, client_id, hl_group, opts) }) end +--- @package --- |lsp-handler| for the method `workspace/semanticTokens/refresh` --- --- Refresh requests are sent by the server to indicate a project-wide change @@ -770,9 +770,7 @@ end --- invalidate the current results of all buffers and automatically kick off a --- new request for buffers that are displayed in a window. For those that aren't, a --- the BufWinEnter event should take care of it next time it's displayed. ---- ----@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#semanticTokens_refreshRequest -handlers[ms.workspace_semanticTokens_refresh] = function(err, _, ctx) +function M._refresh(err, _, ctx) if err then return vim.NIL end |