Add logging of missing or unexpected capture names in Tree-sitter queries (#37830)

Now logs warnings for unrecognized capture names and logs errors for
missing required captures.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Michael Sloan
2025-09-12 15:01:16 -06:00
committed by GitHub
co-authored by Max
parent e71012a2f8
commit cd2ecbbd27
3 changed files with 222 additions and 142 deletions
@@ -2,8 +2,8 @@
(#match? @_jsdoc_comment "(?s)^/[*][*][^*].*[*]/$")) @injection.content
(#set! injection.language "jsdoc"))
(((comment) @reference
(#match? @reference "^///\\s+<reference\\s+types=\"\\S+\"\\s*/>\\s*$")) @injection.content
(((comment) @_reference
(#match? @_reference "^///\\s+<reference\\s+types=\"\\S+\"\\s*/>\\s*$")) @injection.content
(#set! injection.language "html"))
((regex) @injection.content
+1 -1
View File
@@ -1 +1 @@
(comment)+ @comment
(comment)+ @comment.around