mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
15
runtime/queries/templ/folds.scm
Normal file
15
runtime/queries/templ/folds.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
(component_block)
|
||||
(css_declaration)
|
||||
(script_declaration)
|
||||
(element)
|
||||
(style_element)
|
||||
(script_element)
|
||||
(component_switch_statement)
|
||||
(field_declaration_list)
|
||||
(block)
|
||||
(interface_type)
|
||||
(comment)
|
||||
(const_declaration)
|
||||
(var_declaration)
|
||||
] @fold
|
||||
60
runtime/queries/templ/highlights.scm
Normal file
60
runtime/queries/templ/highlights.scm
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
; inherits: go
|
||||
|
||||
(component_declaration
|
||||
name: (component_identifier) @function)
|
||||
|
||||
[
|
||||
(tag_start)
|
||||
(tag_end)
|
||||
(self_closing_tag)
|
||||
(style_element)
|
||||
] @tag
|
||||
|
||||
(doctype) @constant
|
||||
|
||||
(attribute
|
||||
name: (attribute_name) @tag.attribute)
|
||||
|
||||
(attribute
|
||||
value: (quoted_attribute_value) @string)
|
||||
|
||||
[
|
||||
(element_text)
|
||||
(style_element_text)
|
||||
] @string.special
|
||||
|
||||
(css_identifier) @function
|
||||
|
||||
(css_property
|
||||
name: (css_property_name) @property)
|
||||
|
||||
(css_property
|
||||
value: (css_property_value) @string)
|
||||
|
||||
[
|
||||
(expression)
|
||||
(dynamic_class_attribute_value)
|
||||
] @function.method
|
||||
|
||||
(component_import
|
||||
name: (component_identifier) @function)
|
||||
|
||||
(component_render) @function.call
|
||||
|
||||
(element_comment) @comment @spell
|
||||
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
"</"
|
||||
"/>"
|
||||
"<!"
|
||||
] @tag.delimiter
|
||||
|
||||
"@" @operator
|
||||
|
||||
[
|
||||
"templ"
|
||||
"css"
|
||||
"script"
|
||||
] @keyword
|
||||
13
runtime/queries/templ/injections.scm
Normal file
13
runtime/queries/templ/injections.scm
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
; inherits: go
|
||||
|
||||
((element_comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((script_block_text) @injection.content
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
((script_element_text) @injection.content
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
((style_element_text) @injection.content
|
||||
(#set! injection.language "css"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue