File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -710,7 +710,8 @@ local function buildTokens(state, results)
710710 local tokens = {}
711711 local lastLine = 0
712712 local lastStartChar = 0
713- for i , source in ipairs (results ) do
713+ local index = 0
714+ for _ , source in ipairs (results ) do
714715 local startPos = source .start
715716 local finishPos = source .finish
716717 local line = startPos .line
@@ -728,7 +729,8 @@ local function buildTokens(state, results)
728729 lastLine = line
729730 lastStartChar = startChar
730731 -- see https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#textDocument_semanticTokens
731- local len = i * 5 - 5
732+ index = index + 1
733+ local len = index * 5 - 5
732734 tokens [len + 1 ] = deltaLine
733735 tokens [len + 2 ] = deltaStartChar
734736 tokens [len + 3 ] = finishPos .character - startPos .character -- length
You can’t perform that action at this time.
0 commit comments