mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00

committed by
Lewis Russell

parent
4682f158a0
commit
917172dd96
@@ -644,6 +644,11 @@ M[ms.workspace_inlayHint_refresh] = function(err, result, ctx, config)
|
|||||||
return vim.lsp.inlay_hint.on_refresh(err, result, ctx, config)
|
return vim.lsp.inlay_hint.on_refresh(err, result, ctx, config)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#semanticTokens_refreshRequest
|
||||||
|
M[ms.workspace_semanticTokens_refresh] = function(err, result, ctx, _config)
|
||||||
|
return vim.lsp.semantic_tokens._refresh(err, result, ctx)
|
||||||
|
end
|
||||||
|
|
||||||
-- Add boilerplate error validation and logging for all of these.
|
-- Add boilerplate error validation and logging for all of these.
|
||||||
for k, fn in pairs(M) do
|
for k, fn in pairs(M) do
|
||||||
M[k] = function(err, result, ctx, config)
|
M[k] = function(err, result, ctx, config)
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
local api = vim.api
|
local api = vim.api
|
||||||
local bit = require('bit')
|
local bit = require('bit')
|
||||||
local handlers = require('vim.lsp.handlers')
|
|
||||||
local ms = require('vim.lsp.protocol').Methods
|
local ms = require('vim.lsp.protocol').Methods
|
||||||
local util = require('vim.lsp.util')
|
local util = require('vim.lsp.util')
|
||||||
local uv = vim.uv
|
local uv = vim.uv
|
||||||
@@ -763,6 +762,7 @@ function M.highlight_token(token, bufnr, client_id, hl_group, opts)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @package
|
||||||
--- |lsp-handler| for the method `workspace/semanticTokens/refresh`
|
--- |lsp-handler| for the method `workspace/semanticTokens/refresh`
|
||||||
---
|
---
|
||||||
--- Refresh requests are sent by the server to indicate a project-wide change
|
--- 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
|
--- 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
|
--- 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.
|
--- the BufWinEnter event should take care of it next time it's displayed.
|
||||||
---
|
function M._refresh(err, _, ctx)
|
||||||
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#semanticTokens_refreshRequest
|
|
||||||
handlers[ms.workspace_semanticTokens_refresh] = function(err, _, ctx)
|
|
||||||
if err then
|
if err then
|
||||||
return vim.NIL
|
return vim.NIL
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user