diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-04 16:39:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-04 16:39:49 +0800 |
commit | 8d4cdc453a89077d7f5ed7ec96f1dacce4bc4f4d (patch) | |
tree | 370e62a43e8beba9517e7480d1d6cbc0cfe9ad15 | |
parent | d5433249e920969365f7cc16f1fffb6b42383d29 (diff) | |
download | lua-language-server-8d4cdc453a89077d7f5ed7ec96f1dacce4bc4f4d.zip |
fix
-rw-r--r-- | script/files.lua | 1 | ||||
-rw-r--r-- | script/workspace/workspace.lua | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/script/files.lua b/script/files.lua index e9aae50b..d18fade3 100644 --- a/script/files.lua +++ b/script/files.lua @@ -100,6 +100,7 @@ end ---@param libraryUri uri function m.setLibraryUri(scp, uri, libraryUri) scp:get 'libraryMap' [uri] = libraryUri + scp:addLink(uri) end --- 是否是库文件 diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 1d20593f..92aca131 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -138,8 +138,8 @@ end --- 创建代码库筛选器 ---@param scp scope function m.getLibraryMatchers(scp) - if scp:get 'nativeMatcher' then - return scp:get 'nativeMatcher' + if scp:get 'libraryMatcher' then + return scp:get 'libraryMatcher' end local librarys = {} @@ -169,7 +169,7 @@ function m.getLibraryMatchers(scp) end end - scp:set('nativeMatcher', matchers) + scp:set('libraryMatcher', matchers) return matchers end @@ -418,7 +418,11 @@ end ---@async ---@param scp scope function m.awaitReload(scp) + scp:set('ready', false) + scp:set('nativeMatcher', nil) + scp:set('libraryMatcher', nil) m.flushFiles(scp) + files.flushAllLibrary(scp) plugin.init(scp) m.awaitPreload(scp) scp:set('ready', true) |