diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-16 00:31:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-16 00:31:50 +0800 |
commit | 8b315d6f1d1ed2e680014841b84c3a768a136bd9 (patch) | |
tree | f8b503cd248528a2c1c4e79a4a0e0ce7cc60acb9 | |
parent | 8b5c02c49fa397a40f03dc5c27dd6872dee13b2c (diff) | |
download | lua-language-server-8b315d6f1d1ed2e680014841b84c3a768a136bd9.zip |
fix refresh
-rw-r--r-- | script/provider/inlay-hint.lua | 7 | ||||
-rw-r--r-- | script/provider/semantic-tokens.lua | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/script/provider/inlay-hint.lua b/script/provider/inlay-hint.lua index 384e1d47..12b43330 100644 --- a/script/provider/inlay-hint.lua +++ b/script/provider/inlay-hint.lua @@ -3,14 +3,13 @@ local client = require 'client' local json = require "json" local config = require 'config' -if not client.getAbility 'workspace.inlayHint.refreshSupport' then - return -end - local function refresh() if not client.isReady() then return end + if not client.getAbility 'workspace.inlayHint.refreshSupport' then + return + end log.debug('Refresh inlay hints.') proto.request('workspace/inlayHint/refresh', json.null) end 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 |