diff options
author | fsouza <108725+fsouza@users.noreply.github.com> | 2022-12-10 06:16:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 12:16:33 +0100 |
commit | 6d37d8cb17390419360c1459607beac2d93183b6 (patch) | |
tree | 52c6019660731c79917529a82950579fca9b628c /test/functional/plugin/lsp/helpers.lua | |
parent | f96fb23de62f9539bf254cc1a4e99d1da8b71994 (diff) | |
download | rneovim-6d37d8cb17390419360c1459607beac2d93183b6.tar.gz rneovim-6d37d8cb17390419360c1459607beac2d93183b6.tar.bz2 rneovim-6d37d8cb17390419360c1459607beac2d93183b6.zip |
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>
Diffstat (limited to 'test/functional/plugin/lsp/helpers.lua')
-rw-r--r-- | test/functional/plugin/lsp/helpers.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/functional/plugin/lsp/helpers.lua b/test/functional/plugin/lsp/helpers.lua index 1363ab894d..028ccb9e2c 100644 --- a/test/functional/plugin/lsp/helpers.lua +++ b/test/functional/plugin/lsp/helpers.lua @@ -36,9 +36,7 @@ M.create_server_definition = [[ local handler = handlers[method] if handler then local response, err = handler(method, params) - if response then - callback(err, response) - end + callback(err, response) elseif method == 'initialize' then callback(nil, { capabilities = opts.capabilities or {} |