diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-17 10:26:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-17 10:26:49 +0800 |
commit | a9bf4d58c069d06cc6b7f002e0347eb26b0451ab (patch) | |
tree | 6d30e8717eb6f784c4cce71d90c61e0d29479bd5 /script-beta | |
parent | 3d1b5fde86725f821f0936e3be8f57e01a8cd93c (diff) | |
download | lua-language-server-a9bf4d58c069d06cc6b7f002e0347eb26b0451ab.zip |
重载工作区时也要清空函数库
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/files.lua | 4 | ||||
-rw-r--r-- | script-beta/workspace/workspace.lua | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/script-beta/files.lua b/script-beta/files.lua index 2d2f00da..681245e3 100644 --- a/script-beta/files.lua +++ b/script-beta/files.lua @@ -77,6 +77,10 @@ function m.getLibraryPath(uri) return m.libraryMap[uri] end +function m.flushAllLibrary() + m.libraryMap = {} +end + --- 是否存在 ---@return boolean function m.exists(uri) diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua index ce8cf161..08402bdb 100644 --- a/script-beta/workspace/workspace.lua +++ b/script-beta/workspace/workspace.lua @@ -298,6 +298,7 @@ function m.getRelativePath(uri) end function m.reload() + files.flushAllLibrary() files.removeAllClosed() rpath.flush() await.call(m.awaitPreload) |