summaryrefslogtreecommitdiff
path: root/server/src/service.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-16 17:19:10 +0800
committersumneko <sumneko@hotmail.com>2019-04-16 17:19:10 +0800
commit9fe54198a9a435b70e41dac904d4353b67806ac8 (patch)
treeec2a8ba880d29fdad0c3b0a37a33959eaba6640f /server/src/service.lua
parentca69ac28173674eb80f822161ed6379e6070d272 (diff)
downloadlua-language-server-9fe54198a9a435b70e41dac904d4353b67806ac8.zip
修改文件关联也要重新扫描工作目录
Diffstat (limited to 'server/src/service.lua')
-rw-r--r--server/src/service.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index b7290329..0a1b27aa 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -674,8 +674,10 @@ end
function mt:onUpdateConfig(updated, other)
local oldConfig = table.deepCopy(config.config)
+ local oldOther = table.deepCopy(config.other)
config:setConfig(updated, other)
local newConfig = config.config
+ local newOther = config.other
if not table.equal(oldConfig.runtime, newConfig.runtime) then
local library = require 'core.library'
library.reload()
@@ -685,7 +687,9 @@ function mt:onUpdateConfig(updated, other)
log.debug('reDiagnostic')
self:reDiagnostic()
end
- if not table.equal(oldConfig.workspace, newConfig.workspace) then
+ if not table.equal(oldConfig.workspace, newConfig.workspace)
+ or not table.equal(oldOther.associations, newOther.associations)
+ then
self:clearAllFiles()
if self.workspace then
self.workspace:scanFiles()