Skip to content

Commit fc67d4c

Browse files
committed
Fix not-detecting repository inside a patterns array
1 parent 0bc67ef commit fc67d4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DiagnosticCollection.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ export function initDiagnostics(context: vscode.ExtensionContext) {
4141
(repo
4242
(key) @nestRepo))
4343
!match !begin)
44+
(pattern
45+
(patterns) (repository
46+
(repo
47+
(key) @nestRepo))
48+
!match !begin)
4449
`;
4550
repoQuery = jsonParserLanguage.query(repoQueryString);
4651

@@ -306,6 +311,7 @@ function Diagnostics(document: vscode.TextDocument, Diagnostics: vscode.Diagnost
306311
endPosition: node.endPosition,
307312
};
308313
const repoMatches = repoQuery.matches(rootNode, queryOptions);
314+
// vscode.window.showInformationMessage(JSON.stringify(repoMatches));
309315
for (const repoMatch of repoMatches) {
310316
const repoCaptures = repoMatch.captures;
311317
for (const repoCapture of repoCaptures) {

0 commit comments

Comments
 (0)