summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-24 15:19:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-24 15:19:59 +0800
commit29dc52e91c2d14903af4bf616e4e40a30e2a9024 (patch)
tree0348cc02f2a50d11fdfc76897113b2656748162e /script/workspace
parent5ba257313e9e6398e97476407aea43dd80ab996f (diff)
downloadlua-language-server-29dc52e91c2d14903af4bf616e4e40a30e2a9024.zip
config.workspace.library supports `${meta}`
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 667ac56f..bca6a5ff 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -120,6 +120,9 @@ function m.getNativeMatcher()
end
-- config.workspace.library
for path in pairs(config.config.workspace.library) do
+ path = path:gsub('${(.-)}', {
+ meta = (ROOT / 'meta' / '3rd'):string(),
+ })
log.info('Ignore by library:', path)
pattern[#pattern+1] = path
end
@@ -138,6 +141,9 @@ function m.getLibraryMatchers()
local librarys = {}
for path in pairs(config.config.workspace.library) do
+ path = path:gsub('${(.-)}', {
+ meta = (ROOT / 'meta' / '3rd'):string(),
+ })
librarys[m.normalize(path)] = true
end
if library.metaPath then