mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
fix(lsp): ignore null responses for semanticTokens request (#21364)
The spec indicates that the response may be `null`, but it doesn't really say what a `null` response means. Since neovim raises an error if the response is `null`, I figured that ignoring it would be the safest bet. Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
This commit is contained in:
@@ -304,6 +304,11 @@ function STHighlighter:process_response(response, client, version)
|
||||
-- reset active request
|
||||
state.active_request = {}
|
||||
|
||||
-- skip nil responses
|
||||
if response == nil then
|
||||
return
|
||||
end
|
||||
|
||||
-- if we have a response to a delta request, update the state of our tokens
|
||||
-- appropriately. if it's a full response, just use that
|
||||
local tokens
|
||||
|
||||
Reference in New Issue
Block a user