diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-13 13:02:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-13 13:02:54 +0800 |
commit | c3e280a5bc556cb8ff87a6b0fc6f7a7c48292d4d (patch) | |
tree | 6c94b4cee3af77af9f6eb5dda47826d821200663 /script-beta/workspace/workspace.lua | |
parent | 27034b3d99b31be96865e50d70a776fb3caac088 (diff) | |
download | lua-language-server-c3e280a5bc556cb8ff87a6b0fc6f7a7c48292d4d.zip |
加载 meta
Diffstat (limited to 'script-beta/workspace/workspace.lua')
-rw-r--r-- | script-beta/workspace/workspace.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua index 543a63a9..0050e299 100644 --- a/script-beta/workspace/workspace.lua +++ b/script-beta/workspace/workspace.lua @@ -9,6 +9,7 @@ local await = require 'await' local rpath = require 'workspace.require-path' local proto = require 'proto.proto' local lang = require 'language' +local library = require 'library' local m = {} m.type = 'workspace' @@ -120,8 +121,15 @@ function m.getLibraryMatchers() return m.libraryMatchers end - m.libraryMatchers = {} + local librarys = {} for path, pattern in pairs(config.config.workspace.library) do + librarys[path] = pattern + end + if library.metapath then + librarys[library.metapath] = true + end + m.libraryMatchers = {} + for path, pattern in pairs(librarys) do local nPath = fs.absolute(fs.path(path)):string() local matcher = glob.gitignore(pattern, m.matchOption) if platform.OS == 'Windows' then |