languages: update templ (#10114)

pull/10119/head
Angus Dippenaar 8 months ago committed by GitHub
parent 226b2755fb
commit e0ec34421b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3198,7 +3198,7 @@ language-servers = [ "templ" ]
[[grammar]] [[grammar]]
name = "templ" name = "templ"
source = { git = "https://github.com/vrischmann/tree-sitter-templ", rev = "ea56ac0655243490a4929a988f4eaa91dfccc995" } source = { git = "https://github.com/vrischmann/tree-sitter-templ", rev = "db662414ccd6f7c78b1e834e7abe11c224b04759" }
[[language]] [[language]]
name = "dbml" name = "dbml"

@ -1,28 +1,9 @@
(package_identifier) @namespace ; inherits: go
(parameter_declaration (identifier) @variable.parameter) (css_declaration
(variadic_parameter_declaration (identifier) @variable.parameter) name: (css_identifier) @function)
(script_declaration
(function_declaration name: (script_identifier) @function)
name: (identifier) @function)
(type_spec name: (type_identifier) @type)
(type_identifier) @type
(field_identifier) @variable.other.member
(identifier) @variable
; Function calls
(call_expression
function: (identifier) @function)
(call_expression
function: (selector_expression
field: (field_identifier) @function))
;
; These are Templ specific
;
(component_declaration (component_declaration
name: (component_identifier) @function) name: (component_identifier) @function)
@ -42,6 +23,8 @@
(css_property (css_property
name: (css_property_name) @attribute) name: (css_property_name) @attribute)
(css_property
value: (css_property_value) @constant)
(expression) @function.method (expression) @function.method
(dynamic_class_attribute_value) @function.method (dynamic_class_attribute_value) @function.method
@ -56,36 +39,12 @@
] @operator ] @operator
[ [
"func"
"var"
"const"
"templ" "templ"
"css" "css"
"type" "type"
"struct"
"range"
"script" "script"
] @keyword.storage.type ] @keyword.storage.type
[
"return"
] @keyword.control.return
[
"import"
"package"
] @keyword.control.import
[
"else"
"case"
"switch"
"if"
"default"
] @keyword.control.conditional
"for" @keyword.control.repeat
[ [
(interpreted_string_literal) (interpreted_string_literal)
(raw_string_literal) (raw_string_literal)

Loading…
Cancel
Save