summaryrefslogtreecommitdiff
path: root/script/provider/semantic-tokens.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-16 00:31:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-16 00:31:50 +0800
commit8b315d6f1d1ed2e680014841b84c3a768a136bd9 (patch)
treef8b503cd248528a2c1c4e79a4a0e0ce7cc60acb9 /script/provider/semantic-tokens.lua
parent8b5c02c49fa397a40f03dc5c27dd6872dee13b2c (diff)
downloadlua-language-server-8b315d6f1d1ed2e680014841b84c3a768a136bd9.zip
fix refresh
Diffstat (limited to 'script/provider/semantic-tokens.lua')
-rw-r--r--script/provider/semantic-tokens.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/script/provider/semantic-tokens.lua b/script/provider/semantic-tokens.lua
index 80416fff..0218db2a 100644
--- a/script/provider/semantic-tokens.lua
+++ b/script/provider/semantic-tokens.lua
@@ -3,14 +3,13 @@ local client = require 'client'
local json = require "json"
local config = require 'config'
-if not client.getAbility 'workspace.semanticTokens.refreshSupport' then
- return
-end
-
local function refresh()
if not client.isReady() then
return
end
+ if not client.getAbility 'workspace.semanticTokens.refreshSupport' then
+ return
+ end
log.debug('Refresh semantic tokens.')
proto.request('workspace/semanticTokens/refresh', json.null)
end