From 31b3fe9a399f280206055811ee89ee8bbdd743cf Mon Sep 17 00:00:00 2001 From: mehmetkesik <52535909+mehmetkesik@users.noreply.github.com> Date: Sat, 4 Jul 2026 21:49:17 +0300 Subject: [PATCH] Update rshtml (#15545) --- languages.toml | 3 +-- runtime/queries/rshtml/highlights.scm | 33 +++----------------------- runtime/queries/rshtml/injections.scm | 3 --- runtime/queries/rshtml/textobjects.scm | 9 ------- 4 files changed, 4 insertions(+), 44 deletions(-) diff --git a/languages.toml b/languages.toml index ec9abf6f..2ec7cccf 100644 --- a/languages.toml +++ b/languages.toml @@ -1271,12 +1271,11 @@ language-servers = [ "superhtml", ] roots = ["Cargo.lock", "Cargo.toml"] -block-comment-tokens = { start = "@*", end = "*@" } indent = { tab-width = 2, unit = " " } [[grammar]] name = "rshtml" -source = { git = "https://github.com/rshtml/tree-sitter-rshtml", rev = "89ae0f3a5e221a83aad243def85e822616d3b3c2" } +source = { git = "https://github.com/rshtml/tree-sitter-rshtml", rev = "a1499c58d4692ec5bc0faed790b4e90ab0fb8996" } [[language]] name = "bash" diff --git a/runtime/queries/rshtml/highlights.scm b/runtime/queries/rshtml/highlights.scm index cda08ef1..d1af23e6 100644 --- a/runtime/queries/rshtml/highlights.scm +++ b/runtime/queries/rshtml/highlights.scm @@ -6,44 +6,20 @@ (open_brace) @punctuation.bracket (close_brace) @punctuation.bracket -(fat_arrow) @operator (semicolon) @punctuation.delimiter (equals) @punctuation.delimiter (string_line) @string -(comment_block) @comment.block -(open_comment) @operator -(close_comment) @operator - (continue_) @keyword.control.conditional (break_) @keyword.control.conditional -( - (start_symbol) @keyword.control.import - . - (extends_) @keyword.control.import -) -(raw_) @keyword - -( - (start_symbol) @keyword.control.import - . - (include_directive (include_) @keyword.control.import) -) - -(render_) @keyword -(render_body_) @keyword (child_content_) @keyword -(section_) @keyword - -(section_block - name: (rust_identifier) @namespace) (as_) @keyword.operator (as_clause - alias: (rust_identifier) @type) + alias: (component_tag_identifier) @type) ( (start_symbol) @keyword.control.import . @@ -100,11 +76,8 @@ . (while_stmt) ) -( - (start_symbol) @keyword.control.conditional - . - (match_stmt) -) + +(param_name) @variable.parameter ;this is for now extra (else_clause diff --git a/runtime/queries/rshtml/injections.scm b/runtime/queries/rshtml/injections.scm index 9c91bfbb..5fc07d41 100644 --- a/runtime/queries/rshtml/injections.scm +++ b/runtime/queries/rshtml/injections.scm @@ -7,6 +7,3 @@ (#set! injection.language "rust") (#set! injection.include-children) (#not-match? @injection.content "^else")) - -((comment_block) @injection.content - (#set! injection.language "comment")) diff --git a/runtime/queries/rshtml/textobjects.scm b/runtime/queries/rshtml/textobjects.scm index 2a88c88b..c0ea0247 100644 --- a/runtime/queries/rshtml/textobjects.scm +++ b/runtime/queries/rshtml/textobjects.scm @@ -1,7 +1,3 @@ -(raw_block (html_text)? @entry.inside) @entry.around - -(section_block body: (_)? @entry.inside) @entry.around - (rust_block content: (rust_text)? @entry.inside) @entry.around @@ -11,10 +7,5 @@ (for_stmt body: (_)? @entry.inside) @entry.around -(match_stmt (match_stmt_arm) @entry.inside) -(match_stmt (match_stmt_arm)+ @entry.inside) @entry.around - (component_tag (component_tag_parameter (rust_identifier) @parameter.inside) @parameter.around) (component_tag body: (component_tag_body)? @entry.inside) @entry.around - -(comment_block (comment_content) @comment.inside) @comment.around -- 2.51.2