summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-30 17:51:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-30 17:51:22 +0800
commitb1c20a1f24cc7e17d446b2ac4e4118c36173dc20 (patch)
treea55942645f0cbc5db38aad471ac92e2d5b4c7c8c /script/provider/provider.lua
parenta555b92349e2ab07b9111a296618a69caa068032 (diff)
downloadlua-language-server-b1c20a1f24cc7e17d446b2ac4e4118c36173dc20.zip
update
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 6b7a56b5..9d853e06 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -252,11 +252,11 @@ m.register 'textDocument/hover' {
abortByFileUpdate = true,
---@async
function (params)
- if not config.get(nil, 'Lua.hover.enable') then
- return
- end
local doc = params.textDocument
local uri = files.getRealUri(doc.uri)
+ if not config.get(uri, 'Lua.hover.enable') then
+ return
+ end
if not workspace.isReady() then
local count, max = workspace.getLoadingProcess(uri)
return {
@@ -493,7 +493,7 @@ m.register 'textDocument/completion' {
return nil
end
local triggerCharacter = params.context and params.context.triggerCharacter
- if config.get(nil, 'editor.acceptSuggestionOnEnter') ~= 'off' then
+ if config.get(uri, 'editor.acceptSuggestionOnEnter') ~= 'off' then
if triggerCharacter == '\n'
or triggerCharacter == '{'
or triggerCharacter == ',' then
@@ -1020,7 +1020,7 @@ do
end
local function refreshStatusBar()
- local value = config.get(nil, 'Lua.window.statusBar')
+ local value = config.get(uri, 'Lua.window.statusBar')
if value then
proto.notify('$/status/show')
else