From 29dc52e91c2d14903af4bf616e4e40a30e2a9024 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= <sumneko@hotmail.com>
Date: Wed, 24 Feb 2021 15:19:59 +0800
Subject: config.workspace.library supports `${meta}`

---
 script/workspace/workspace.lua | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'script/workspace')

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
-- 
cgit v1.2.3