Skip to content

Commit 3428b20

Browse files
committed
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.
1 parent 1608bef commit 3428b20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script/core/semantic-tokens.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ return function (uri, start, finish)
849849
end
850850

851851
if #results == 0 then
852-
return nil
852+
return {}
853853
end
854854

855855
results = solveMultilineAndOverlapping(state, results)

0 commit comments

Comments
 (0)