nvim:add ts queries
This commit is contained in:
parent
d765cbbd60
commit
a7b21679b4
3 changed files with 50 additions and 0 deletions
11
dot_config/nvim/queries/php/injections.scm
Normal file
11
dot_config/nvim/queries/php/injections.scm
Normal 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))
|
30
dot_config/nvim/queries/xml/highlights.scm
Normal file
30
dot_config/nvim/queries/xml/highlights.scm
Normal 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
|
9
dot_config/nvim/queries/xml/indents.scm
Normal file
9
dot_config/nvim/queries/xml/indents.scm
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
(prolog) @indent.zero
|
||||||
|
|
||||||
|
[
|
||||||
|
(start_tag)
|
||||||
|
(element)
|
||||||
|
] @indent.begin
|
||||||
|
|
||||||
|
[ (end_tag) ">" "/>"] @indent.branch
|
Loading…
Add table
Reference in a new issue