summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-03-06 20:57:29 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-03-06 20:57:29 +0800
commit3c994c639b87febc8aa515bea145e32338e658a9 (patch)
tree581af5e385ed9cfcce62b613fc59282c2a34bab9 /script/core
parent0b1b3b65f4fc19cec980e9b253a26353c628c2b2 (diff)
downloadlua-language-server-3c994c639b87febc8aa515bea145e32338e658a9.zip
check multilneTokenSupport
fix #1753
Diffstat (limited to 'script/core')
-rw-r--r--script/core/semantic-tokens.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua
index 60a94281..3d322a3e 100644
--- a/script/core/semantic-tokens.lua
+++ b/script/core/semantic-tokens.lua
@@ -7,6 +7,7 @@ local guide = require 'parser.guide'
local converter = require 'proto.converter'
local config = require 'config'
local linkedTable = require 'linked-table'
+local client = require 'client'
local Care = util.switch()
: case 'getglobal'
@@ -794,7 +795,8 @@ local function solveMultilineAndOverlapping(state, results)
for token in tokens:pairs() do
local startPos = converter.packPosition(state, token.start)
local endPos = converter.packPosition(state, token.finish)
- if endPos.line == startPos.line then
+ if endPos.line == startPos.line
+ or client.getAbility 'textDocument.semanticTokens.multilineTokenSupport' then
new[#new+1] = {
start = startPos,
finish = endPos,