diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-01 20:00:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-01 20:00:22 +0800 |
commit | 71e3ff51d3fb21f3e78a3948809ce4ae92613de2 (patch) | |
tree | 936752e4377a48281cd4b1752b53bcda1352d0bb /script/provider/provider.lua | |
parent | 8077e3e08f2dd799ef9b5335005f1bf85d6340cd (diff) | |
download | lua-language-server-71e3ff51d3fb21f3e78a3948809ce4ae92613de2.zip |
cleanup
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 33404886..54e3d2f4 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -61,11 +61,11 @@ local function updateConfig() acceptSuggestionOnEnter = configs[5], } - local oldConfig = util.deepCopy(config.Lua) - local oldOther = util.deepCopy(config.other) - config.setConfig(updated, other) - local newConfig = config.Lua - local newOther = config.other + local oldConfig = util.deepCopy(config.get 'Lua') + local oldOther = util.deepCopy(config.get 'other') + config.get 'setConfig'(updated, other) + local newConfig = config.get 'Lua' + local newOther = config.get 'other' if not util.equal(oldConfig.runtime, newConfig.runtime) then library.init() @@ -474,7 +474,7 @@ proto.on('textDocument/completion', function (params) return nil end local triggerCharacter = params.context and params.context.triggerCharacter - if config.other.acceptSuggestionOnEnter ~= 'off' then + if config.get 'other.acceptSuggestionOnEnter' ~= 'off' then if triggerCharacter == '\n' or triggerCharacter == '{' or triggerCharacter == ',' then @@ -598,7 +598,7 @@ proto.on('completionItem/resolve', function (item) end) proto.on('textDocument/signatureHelp', function (params) - if not config.Lua.signatureHelp.enable then + if not config.get 'Lua.signatureHelp.enable' then return nil end workspace.awaitReady() @@ -895,7 +895,7 @@ do local function updateHint(uri) local awaitID = 'hint:' .. uri await.close(awaitID) - if not config.Lua.hint.enable then + if not config.get 'Lua.hint.enable' then return end await.setID(awaitID) |