summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-20 16:32:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-20 16:32:48 +0800
commit5b5ffd799bf613c97fa65f83c50018bf942876b0 (patch)
treea38ce7b1a3a87bac0471e4c4a153fbf5a7543c5b /script/workspace
parent12ca56af1b403b1473472d547c377493780e7844 (diff)
downloadlua-language-server-5b5ffd799bf613c97fa65f83c50018bf942876b0.zip
fix diagnostic refresh
syntax errors dose not refresh after reload workspace by change config or `Lua.runtime.XXX`
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 45fd6595..272ceb0e 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -558,7 +558,9 @@ config.watch(function (uri, key, value, oldValue)
or key:find '^Lua.type'
or key:find '^files' then
if value ~= oldValue then
- m.reload(scope.getScope(uri))
+ local scp = scope.getScope(uri)
+ m.reload(scp)
+ m.resetFiles(scp)
end
end
end)