From 3428b2082054ea4df098e611bd3024fa7129d97f Mon Sep 17 00:00:00 2001 From: kevinhwang91 Date: Thu, 3 Feb 2022 13:22:39 +0800 Subject: 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. --- script/core/semantic-tokens.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script') 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) -- cgit v1.2.3