1
0
Fork 0

nvim:add ts queries

This commit is contained in:
Vladimír Dudr 2024-02-01 23:29:09 +01:00
parent d765cbbd60
commit a7b21679b4
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,11 @@
;; extends
(heredoc
(heredoc_start) @_start
(heredoc_body) @sql
(#lua-match? @_start SQL))
(heredoc
(heredoc_start) @_start
(heredoc_body) @html
(#lua-match? @_start HTML))

View file

@ -0,0 +1,30 @@
[
"<"
">"
"</"
"/>"
] @tag.delimiter
"=" @operator
[
(start_tag)
(end_tag)
(xml_decl)
] @tag
(empty_elem_tag) @tag
[(doctype_decl) (xml_decl)] @keyword
(doctype) @string
(system_literal) @string
["encoding" "standalone" "version" ] @tag.attribute
[
(version_info)
(encoding_decl)
(standalone_decl)
] @string
(attribute_name) @tag.attribute
(attribute_value) @string
(comment) @comment

View file

@ -0,0 +1,9 @@
(prolog) @indent.zero
[
(start_tag)
(element)
] @indent.begin
[ (end_tag) ">" "/>"] @indent.branch