summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-07-02 11:57:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2024-07-02 11:57:20 +0800
commit46707395df3255808682fdac883f7d86c1ac9a78 (patch)
tree479c4f681211fc9b454e36f0d0746a9b16355540 /script
parentdc8c1a45c25bb3d146228ba448cfa590d48034f1 (diff)
downloadlua-language-server-46707395df3255808682fdac883f7d86c1ac9a78.zip
处理token超出行范围的问题
Diffstat (limited to 'script')
-rw-r--r--script/core/semantic-tokens.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua
index e908ef7b..a3344f6b 100644
--- a/script/core/semantic-tokens.lua
+++ b/script/core/semantic-tokens.lua
@@ -830,6 +830,10 @@ local function solveMultilineAndOverlapping(state, results)
modifieres = token.modifieres,
}
else
+ --LSP规范说客户端不支持token跨行的话,
+ --token长度可以超出行的范围,客户端应该
+ --将其视为在行的末尾结束。
+ --正好可以测试(拷打)一下客户端的实现。
new[#new+1] = {
start = startPos,
finish = converter.position(startPos.line, 9999),