summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua12
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,