diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-24 15:19:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-24 15:19:59 +0800 |
commit | 29dc52e91c2d14903af4bf616e4e40a30e2a9024 (patch) | |
tree | 0348cc02f2a50d11fdfc76897113b2656748162e /script/workspace | |
parent | 5ba257313e9e6398e97476407aea43dd80ab996f (diff) | |
download | lua-language-server-29dc52e91c2d14903af4bf616e4e40a30e2a9024.zip |
config.workspace.library supports `${meta}`
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/workspace.lua | 6 |
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 |