diff options
author | kevinhwang91 <kevin.hwang@live.com> | 2022-02-03 13:22:39 +0800 |
---|---|---|
committer | kevinhwang91 <kevin.hwang@live.com> | 2022-02-03 13:22:39 +0800 |
commit | 3428b2082054ea4df098e611bd3024fa7129d97f (patch) | |
tree | c6488053b6343153440325e5b64623d49ab19b56 /script/core | |
parent | 1608befdb482355744cda0b6891aaf68a9d662c3 (diff) | |
download | lua-language-server-3428b2082054ea4df098e611bd3024fa7129d97f.zip |
fix(semantic-tokens): `data` field can't be nil
`textDocument/semanticTokens/range` should return `SemanticTokens | null` from LSP specification.
`data` field of the `SemanticTokens` must be a array, even if no result.
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/semantic-tokens.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua index 6163cbbe..bb6282a4 100644 --- a/script/core/semantic-tokens.lua +++ b/script/core/semantic-tokens.lua @@ -849,7 +849,7 @@ return function (uri, start, finish) end if #results == 0 then - return nil + return {} end results = solveMultilineAndOverlapping(state, results) |