summaryrefslogtreecommitdiff
path: root/server/src/method/workspace/didChangeConfiguration.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-03 15:14:38 +0800
committersumneko <sumneko@hotmail.com>2019-04-03 15:14:38 +0800
commit76c979bd235e24e111a09608e8705f9cc81f1af0 (patch)
tree423b6d414d430a68cc535c18f8b59c432579003c /server/src/method/workspace/didChangeConfiguration.lua
parent84328aded8e4f39ac67e5c5046303e3273eabed9 (diff)
downloadlua-language-server-76c979bd235e24e111a09608e8705f9cc81f1af0.zip
根据运行时版本加载不同的函数库
Diffstat (limited to 'server/src/method/workspace/didChangeConfiguration.lua')
-rw-r--r--server/src/method/workspace/didChangeConfiguration.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/method/workspace/didChangeConfiguration.lua b/server/src/method/workspace/didChangeConfiguration.lua
index dd1f84ff..67737eec 100644
--- a/server/src/method/workspace/didChangeConfiguration.lua
+++ b/server/src/method/workspace/didChangeConfiguration.lua
@@ -53,6 +53,9 @@ return function (lsp)
local oldConfig = copyTable(config.config)
config:setConfig(configs[1])
local newConfig = config.config
+ if not eq(oldConfig.runtime, newConfig.runtime) then
+ lsp:reCompile()
+ end
if not eq(oldConfig.diagnostics, newConfig.diagnostics) then
log.debug('reDiagnostic')
lsp:reDiagnostic()