diff options
author | uhziel <uhziel@gmail.com> | 2021-01-04 15:59:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 15:59:39 +0800 |
commit | 525f551abc533b704906fd3a5cb84404fb5cf4de (patch) | |
tree | 71e065e94873a86f53bee9886e1c8a39c1b663f8 /script/provider/provider.lua | |
parent | c57556e25cb02e01011272c305854d0f1c106e1c (diff) | |
parent | 7a63f98e41305e8deb114164e86a621881a5a2bc (diff) | |
download | lua-language-server-525f551abc533b704906fd3a5cb84404fb5cf4de.zip |
Merge branch 'master' into doc-type-table
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 32778399..2d092002 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -35,6 +35,10 @@ local function updateConfig() } }, }) + if not configs or not configs[1] then + log.warn('No config?', util.dump(configs)) + return + end local updated = configs[1] local other = { @@ -42,11 +46,6 @@ local function updateConfig() exclude = configs[3], } - if not updated then - log.warn('No config?', util.dump(configs)) - return - end - local oldConfig = util.deepCopy(config.config) local oldOther = util.deepCopy(config.other) config.setConfig(updated, other) @@ -55,6 +54,7 @@ local function updateConfig() if not util.equal(oldConfig.runtime, newConfig.runtime) then library.init() workspace.reload() + semantic.refresh() end if not util.equal(oldConfig.diagnostics, newConfig.diagnostics) then diagnostics.diagnosticsAll() @@ -67,6 +67,7 @@ local function updateConfig() or not util.equal(oldOther.exclude, newOther.exclude) then workspace.reload() + semantic.refresh() end if not util.equal(oldConfig.intelliSense, newConfig.intelliSense) then files.flushCache() @@ -379,6 +380,7 @@ proto.on('textDocument/completion', function (params) kind = res.kind, deprecated = res.deprecated, sortText = ('%04d'):format(i), + filterText = res.filterText, insertText = res.insertText, insertTextFormat = 2, commitCharacters = res.commitCharacters, |