diff --git a/languages.toml b/languages.toml index c43760c2..14b0bb12 100644 --- a/languages.toml +++ b/languages.toml @@ -748,7 +748,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote [[grammar]] name = "cpp" -source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "56455f4245baf4ea4e0881c5169de69d7edd5ae7" } +source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "8b5b49eb196bec7040441bee33b2c9a4838d6967" } [[language]] name = "crystal" @@ -2449,7 +2449,7 @@ language-servers = [ "solc" ] [[grammar]] name = "solidity" -source = { git = "https://github.com/JoranHonig/tree-sitter-solidity", rev = "f7f5251a3f5b1d04f0799b3571b12918af177fc8" } +source = { git = "https://github.com/JoranHonig/tree-sitter-solidity", rev = "048fe686cb1fde267243739b8bdbec8fc3a55272" } [[language]] name = "gleam" @@ -2464,7 +2464,7 @@ auto-format = true [[grammar]] name = "gleam" -source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "dae1551a9911b24f41d876c23f2ab05ece0a9d4c" } +source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "4e4643c2215c2b2343d9ec179c798818c132c9cc" } [[language]] name = "quarto" @@ -2607,7 +2607,7 @@ injection-regex = "sql" [[grammar]] name = "sql" # from gh-pages branch, as the main branch does not provide the `src` directory -source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "86e3d03837d282544439620eb74d224586074b8b" } +source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "851e9cb257ba7c66cc8c14214a31c44d2f1e954e" } [[language]] name = "gdscript" @@ -2781,14 +2781,14 @@ name = "meson" source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-meson", rev = "c84f3540624b81fc44067030afce2ff78d6ede05" } [[language]] -name = "sshclientconfig" -scope = "source.sshclientconfig" +name = "ssh_client_config" +scope = "source.ssh_client_config" file-types = [{ glob = ".ssh/config" }, { glob = "/etc/ssh/ssh_config" }, { glob = "ssh_config.d/*.conf" } ] comment-token = "#" [[grammar]] -name = "sshclientconfig" -source = { git = "https://github.com/metio/tree-sitter-ssh-client-config", rev = "e45c6d5c71657344d4ecaf87dafae7736f776c57" } +name = "ssh_client_config" +source = { git = "https://github.com/metio/tree-sitter-ssh-client-config", rev = "4abd07dc3884124d60e37e1f2dd98a1676859ae0" } [[language]] name = "scheme" @@ -2916,7 +2916,7 @@ formatter = { command = "cljfmt", args = ["fix", "-"] } [[grammar]] name = "clojure" -source = { git = "https://github.com/sogaiu/tree-sitter-clojure", rev = "e57c569ae332ca365da623712ae1f50f84daeae2" } +source = { git = "https://github.com/sogaiu/tree-sitter-clojure", rev = "e43eff80d17cf34852dcd92ca5e6986d23a7040f" } [[language]] name = "starlark" @@ -4398,7 +4398,7 @@ formatter = { command = "prettier", args = ['--parser', 'glimmer'] } [[grammar]] name = "glimmer" -source = { git = "https://github.com/ember-tooling/tree-sitter-glimmer", rev = "5dc6d1040e8ff8978ff3680e818d85447bbc10aa" } +source = { git = "https://github.com/ember-tooling/tree-sitter-glimmer", rev = "88af85568bde3b91acb5d4c352ed094d0c1f9d84" } [[language]] name = "ohm" diff --git a/runtime/queries/clojure/tags.scm b/runtime/queries/clojure/tags.scm new file mode 100644 index 00000000..d75af17e --- /dev/null +++ b/runtime/queries/clojure/tags.scm @@ -0,0 +1,38 @@ +; (defn name ...), (defmethod ...), etc. The form symbol selects the kind; +; the following symbol is the defined name. @definition.* captures the whole +; form; @name captures the defined symbol within it. +((list_lit + (sym_lit) @_kw + . + (sym_lit) @name) @definition.function + (#any-of? @_kw "defn" "defn-" "defmethod" "defmulti")) + +((list_lit + (sym_lit) @_kw + . + (sym_lit) @name) @definition.macro + (#eq? @_kw "defmacro")) + +((list_lit + (sym_lit) @_kw + . + (sym_lit) @name) @definition.interface + (#any-of? @_kw "defprotocol" "definterface")) + +((list_lit + (sym_lit) @_kw + . + (sym_lit) @name) @definition.struct + (#any-of? @_kw "defrecord" "deftype" "defstruct")) + +((list_lit + (sym_lit) @_kw + . + (sym_lit) @name) @definition.module + (#eq? @_kw "ns")) + +((list_lit + (sym_lit) @_kw + . + (sym_lit) @name) @definition.constant + (#any-of? @_kw "def" "defonce")) diff --git a/runtime/queries/cpp/highlights.scm b/runtime/queries/cpp/highlights.scm index 710ba2f1..da38e62e 100644 --- a/runtime/queries/cpp/highlights.scm +++ b/runtime/queries/cpp/highlights.scm @@ -108,8 +108,12 @@ "<=>" "[]" "()" + "^^" ; C++26 reflection operator (reflect_expression) ] @operator +; C++26 splice brackets `[: reflection :]` (splice_specifier / splice_type_specifier). +(splice_specifier ["[:" ":]"] @punctuation.bracket) + ; These casts are parsed as function calls, but are not. ((identifier) @keyword (#eq? @keyword "static_cast")) diff --git a/runtime/queries/cpp/locals.scm b/runtime/queries/cpp/locals.scm new file mode 100644 index 00000000..46d10d44 --- /dev/null +++ b/runtime/queries/cpp/locals.scm @@ -0,0 +1,19 @@ +; inherits: c + +; C++-specific scopes on top of c's function_definition / declaration scopes. +[ + (lambda_expression) + (namespace_definition) + (class_specifier) + (for_range_loop) +] @local.scope + +; C++-only parameter forms (c only has parameter_declaration). +(optional_parameter_declaration + declarator: (identifier) @local.definition.variable.parameter) +(variadic_parameter_declaration + declarator: (variadic_declarator (identifier) @local.definition.variable.parameter)) + +; Template type parameters. +(type_parameter_declaration + (type_identifier) @local.definition.type) diff --git a/runtime/queries/gleam/highlights.scm b/runtime/queries/gleam/highlights.scm index 51c01f38..5f205786 100644 --- a/runtime/queries/gleam/highlights.scm +++ b/runtime/queries/gleam/highlights.scm @@ -102,7 +102,7 @@ (escape_sequence) @constant.character.escape ((escape_sequence) @warning (#eq? @warning "\\e")) ; deprecated escape sequence -(bit_string_segment_option) @function.builtin +(bit_array_segment_option) @function.builtin (integer) @constant.numeric.integer (float) @constant.numeric.float diff --git a/runtime/queries/glimmer/injections.scm b/runtime/queries/glimmer/injections.scm index 0c0037a0..203cfc60 100644 --- a/runtime/queries/glimmer/injections.scm +++ b/runtime/queries/glimmer/injections.scm @@ -1,2 +1,10 @@ ((comment_statement) @injection.content (#set! injection.language "comment")) + +((script_element + (raw_text) @injection.content) + (#set! injection.language "javascript")) + +((style_element + (raw_text) @injection.content) + (#set! injection.language "css")) diff --git a/runtime/queries/solidity/highlights.scm b/runtime/queries/solidity/highlights.scm index 0e49429d..3ae00e08 100644 --- a/runtime/queries/solidity/highlights.scm +++ b/runtime/queries/solidity/highlights.scm @@ -15,6 +15,7 @@ (hex_string_literal) (unicode_string_literal) (yul_string_literal) + (yul_hex_string_literal) ] @string (hex_string_literal "hex" @string.special.symbol) (unicode_string_literal "unicode" @string.special.symbol) @@ -72,6 +73,9 @@ ; SCREAMING_SNAKE_CASE identifier are constants ((identifier) @constant (#match? @constant "^[A-Z][A-Z_]+$")) +; Member access +(member_expression property: (identifier) @variable.other.member) + ; Invocations (emit_statement name: (expression (identifier) @type)) (revert_statement error: (expression (identifier) @type)) @@ -95,7 +99,6 @@ ) ; Structs and members -(member_expression property: (identifier) @variable.other.member) (struct_expression type: ((expression (identifier)) @type .)) (struct_field_assignment name: (identifier) @variable.other.member) @@ -233,6 +236,9 @@ ">>=" ] @operator +; The operator symbol in `using {f as +} for T` / user-definable `operator`. +(user_definable_operator) @operator + [ "delete" "new" diff --git a/runtime/queries/sql/highlights.scm b/runtime/queries/sql/highlights.scm index 82397edc..3fda34e3 100644 --- a/runtime/queries/sql/highlights.scm +++ b/runtime/queries/sql/highlights.scm @@ -1,3 +1,7 @@ +; Member access +(object_reference + name: (identifier) @variable.other.member) + (invocation (object_reference name: (identifier) @function.method)) @@ -12,9 +16,6 @@ (keyword_array) ] @function.builtin -(object_reference - name: (identifier) @variable.other.member) - (relation alias: (identifier) @variable.parameter) @@ -181,7 +182,9 @@ (keyword_transaction) (keyword_only) (keyword_like) + (keyword_rlike) (keyword_similar) + (keyword_refresh) (keyword_over) (keyword_change) (keyword_modify) diff --git a/runtime/queries/sshclientconfig/highlights.scm b/runtime/queries/ssh_client_config/highlights.scm similarity index 93% rename from runtime/queries/sshclientconfig/highlights.scm rename to runtime/queries/ssh_client_config/highlights.scm index b54da587..d03ad1c6 100644 --- a/runtime/queries/sshclientconfig/highlights.scm +++ b/runtime/queries/ssh_client_config/highlights.scm @@ -322,3 +322,26 @@ (xauth_location) @keyword (xauth_location_value) @string.special.path + +; Options added in newer OpenSSH releases. +(channel_timeout) @keyword +(channel_timeout_type) @constant.builtin +(time_format) @constant.numeric + +(enable_escape_commandline) @keyword +(enable_escape_commandline_value) @constant.builtin.boolean + +(obscure_keystroke_timing) @keyword +(obscure_keystroke_timing_value) @constant.builtin + +(required_rsa_size) @keyword +(required_rsa_size_value) @constant.numeric.integer + +(tag) @keyword +(tag_value) @string + +(use_roaming) @keyword +(use_roaming_value) @constant.builtin.boolean + +(version_addendum) @keyword +(version_addendum_value) @string