File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,15 @@ function mt:getLinkedUri(uri)
70
70
return nil
71
71
end
72
72
73
+ --- @param uri uri
74
+ --- @return uri
75
+ function mt :getRootUri (uri )
76
+ if self :isChildUri (uri ) then
77
+ return self .uri
78
+ end
79
+ return self :getLinkedUri (uri )
80
+ end
81
+
73
82
--- @param k string
74
83
--- @param v any
75
84
function mt :set (k , v )
Original file line number Diff line number Diff line change @@ -162,6 +162,18 @@ function m.getLibraryMatchers(scp)
162
162
end
163
163
log .info (' Build library matchers:' , scp )
164
164
165
+ local pattern = {}
166
+ for path , ignore in pairs (config .get (scp .uri , ' files.exclude' )) do
167
+ if ignore then
168
+ log .info (' Ignore by exclude:' , path )
169
+ pattern [# pattern + 1 ] = path
170
+ end
171
+ end
172
+ for _ , path in ipairs (config .get (scp .uri , ' Lua.workspace.ignoreDir' )) do
173
+ log .info (' Ignore directory:' , path )
174
+ pattern [# pattern + 1 ] = path
175
+ end
176
+
165
177
local librarys = {}
166
178
for path in pairs (config .get (scp .uri , ' Lua.workspace.library' )) do
167
179
path = m .getAbsolutePath (scp .uri , path )
@@ -178,7 +190,7 @@ function m.getLibraryMatchers(scp)
178
190
for path in pairs (librarys ) do
179
191
if fs .exists (fs .path (path )) then
180
192
local nPath = fs .absolute (fs .path (path )):string ()
181
- local matcher = glob .gitignore (true , {
193
+ local matcher = glob .gitignore (pattern , {
182
194
root = path ,
183
195
ignoreCase = platform .OS == ' Windows' ,
184
196
}, globInteferFace )
You can’t perform that action at this time.
0 commit comments