diff options
author | sumneko <sumneko@hotmail.com> | 2022-01-23 04:18:52 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2022-01-23 04:18:52 +0800 |
commit | a13a30f193b54f32138306463dd8e13d208fb45c (patch) | |
tree | 80ccf3511287bbeb5a4db4e5ea79b2867b4dbba2 /script/workspace | |
parent | 1c8095439f8d738390b3cc19fa3f82853dd89f95 (diff) | |
download | lua-language-server-a13a30f193b54f32138306463dd8e13d208fb45c.zip |
fix
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/require-path.lua | 3 | ||||
-rw-r--r-- | script/workspace/scope.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua index d0d96164..3454cbf1 100644 --- a/script/workspace/require-path.lua +++ b/script/workspace/require-path.lua @@ -164,6 +164,9 @@ function m.flush(suri) end end +for _, scp in ipairs(scope.folders) do + m.flush(scp.uri) +end m.flush(nil) files.watch(function (ev, uri) diff --git a/script/workspace/scope.lua b/script/workspace/scope.lua index 4e04d720..711fc1a1 100644 --- a/script/workspace/scope.lua +++ b/script/workspace/scope.lua @@ -123,7 +123,7 @@ end ---@return scope function m.getFolder(uri) for _, scope in ipairs(m.folders) do - if not uri or scope:isChildUri(uri) then + if scope:isChildUri(uri) then return scope end end |