From 86fa27eb54838e69292307c30ac611e0d32993c5 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 27 Jul 2023 12:41:19 -0400 Subject: [PATCH] Update uses of `#` to `.` in our scheme files where they are interchangeable. uses of `#` cause ERRORs in our scheme highlighting --- crates/zed/src/languages/bash/highlights.scm | 2 +- crates/zed/src/languages/c/highlights.scm | 3 +-- crates/zed/src/languages/c/injections.scm | 4 ++-- crates/zed/src/languages/cpp/highlights.scm | 4 ++-- crates/zed/src/languages/cpp/injections.scm | 4 ++-- crates/zed/src/languages/css/highlights.scm | 2 +- crates/zed/src/languages/elixir/embedding.scm | 6 +++--- crates/zed/src/languages/elixir/highlights.scm | 18 +++++++++--------- crates/zed/src/languages/elixir/injections.scm | 4 ++-- crates/zed/src/languages/elixir/outline.scm | 4 ++-- crates/zed/src/languages/elm/injections.scm | 2 +- crates/zed/src/languages/erb/injections.scm | 8 ++++---- crates/zed/src/languages/glsl/highlights.scm | 4 ++-- crates/zed/src/languages/heex/injections.scm | 6 +++--- crates/zed/src/languages/html/injections.scm | 4 ++-- .../src/languages/javascript/highlights.scm | 6 +++--- crates/zed/src/languages/lua/highlights.scm | 6 +++--- crates/zed/src/languages/php/highlights.scm | 8 ++++---- crates/zed/src/languages/php/injections.scm | 4 ++-- crates/zed/src/languages/python/highlights.scm | 8 ++++---- crates/zed/src/languages/racket/highlights.scm | 7 +++---- crates/zed/src/languages/racket/outline.scm | 4 ++-- crates/zed/src/languages/ruby/brackets.scm | 2 +- crates/zed/src/languages/ruby/highlights.scm | 8 ++++---- crates/zed/src/languages/rust/highlights.scm | 4 ++-- crates/zed/src/languages/rust/injections.scm | 4 ++-- crates/zed/src/languages/scheme/highlights.scm | 4 ++-- crates/zed/src/languages/scheme/outline.scm | 4 ++-- crates/zed/src/languages/svelte/injections.scm | 14 +++++++------- .../src/languages/typescript/highlights.scm | 6 +++--- 30 files changed, 81 insertions(+), 83 deletions(-) diff --git a/crates/zed/src/languages/bash/highlights.scm b/crates/zed/src/languages/bash/highlights.scm index a72c5468ed..f3e0c9529a 100644 --- a/crates/zed/src/languages/bash/highlights.scm +++ b/crates/zed/src/languages/bash/highlights.scm @@ -54,5 +54,5 @@ ( (command (_) @constant) - (#match? @constant "^-") + (.match? @constant "^-") ) diff --git a/crates/zed/src/languages/c/highlights.scm b/crates/zed/src/languages/c/highlights.scm index 064ec61a37..5245e53a05 100644 --- a/crates/zed/src/languages/c/highlights.scm +++ b/crates/zed/src/languages/c/highlights.scm @@ -86,7 +86,7 @@ (identifier) @variable ((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) + (.match? @constant "^_*[A-Z][A-Z\\d_]*$")) (call_expression function: (identifier) @function) @@ -106,4 +106,3 @@ (primitive_type) (sized_type_specifier) ] @type - diff --git a/crates/zed/src/languages/c/injections.scm b/crates/zed/src/languages/c/injections.scm index 845a63bd1b..fbc7d83f82 100644 --- a/crates/zed/src/languages/c/injections.scm +++ b/crates/zed/src/languages/c/injections.scm @@ -1,7 +1,7 @@ (preproc_def value: (preproc_arg) @content - (#set! "language" "c")) + (.set! "language" "c")) (preproc_function_def value: (preproc_arg) @content - (#set! "language" "c")) \ No newline at end of file + (.set! "language" "c")) diff --git a/crates/zed/src/languages/cpp/highlights.scm b/crates/zed/src/languages/cpp/highlights.scm index bcfa01ca5c..a040b1d053 100644 --- a/crates/zed/src/languages/cpp/highlights.scm +++ b/crates/zed/src/languages/cpp/highlights.scm @@ -31,13 +31,13 @@ declarator: (field_identifier) @function) ((namespace_identifier) @type - (#match? @type "^[A-Z]")) + (.match? @type "^[A-Z]")) (auto) @type (type_identifier) @type ((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) + (.match? @constant "^_*[A-Z][A-Z\\d_]*$")) (field_identifier) @property (statement_identifier) @label diff --git a/crates/zed/src/languages/cpp/injections.scm b/crates/zed/src/languages/cpp/injections.scm index eca372d577..3c94ba4061 100644 --- a/crates/zed/src/languages/cpp/injections.scm +++ b/crates/zed/src/languages/cpp/injections.scm @@ -1,7 +1,7 @@ (preproc_def value: (preproc_arg) @content - (#set! "language" "c++")) + (.set! "language" "c++")) (preproc_function_def value: (preproc_arg) @content - (#set! "language" "c++")) \ No newline at end of file + (.set! "language" "c++")) diff --git a/crates/zed/src/languages/css/highlights.scm b/crates/zed/src/languages/css/highlights.scm index e271d8583c..83f99861c5 100644 --- a/crates/zed/src/languages/css/highlights.scm +++ b/crates/zed/src/languages/css/highlights.scm @@ -46,7 +46,7 @@ (property_name) (plain_value) ] @variable.special - (#match? @variable.special "^--") + (.match? @variable.special "^--") ) [ diff --git a/crates/zed/src/languages/elixir/embedding.scm b/crates/zed/src/languages/elixir/embedding.scm index 16ad20746d..3c523c2487 100644 --- a/crates/zed/src/languages/elixir/embedding.scm +++ b/crates/zed/src/languages/elixir/embedding.scm @@ -3,7 +3,7 @@ operator: "@" operand: (call target: (identifier) @unary - (#match? @unary "^(doc)$")) + (.match? @unary "^(doc)$")) ) @context . (call @@ -18,10 +18,10 @@ target: (identifier) @name) operator: "when") ]) - (#match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item + (.match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item ) (call target: (identifier) @name (arguments (alias) @name) - (#match? @name "^(defmodule|defprotocol)$")) @item + (.match? @name "^(defmodule|defprotocol)$")) @item diff --git a/crates/zed/src/languages/elixir/highlights.scm b/crates/zed/src/languages/elixir/highlights.scm index 0e779d195c..a8fd7eb45a 100644 --- a/crates/zed/src/languages/elixir/highlights.scm +++ b/crates/zed/src/languages/elixir/highlights.scm @@ -54,13 +54,13 @@ (sigil_name) @__name__ quoted_start: _ @string quoted_end: _ @string - (#match? @__name__ "^[sS]$")) @string + (.match? @__name__ "^[sS]$")) @string (sigil (sigil_name) @__name__ quoted_start: _ @string.regex quoted_end: _ @string.regex - (#match? @__name__ "^[rR]$")) @string.regex + (.match? @__name__ "^[rR]$")) @string.regex (sigil (sigil_name) @__name__ @@ -69,7 +69,7 @@ ( (identifier) @comment.unused - (#match? @comment.unused "^_") + (.match? @comment.unused "^_") ) (call @@ -91,7 +91,7 @@ operator: "|>" right: (identifier)) ]) - (#match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$")) + (.match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$")) (binary_operator operator: "|>" @@ -99,15 +99,15 @@ (call target: (identifier) @keyword - (#match? @keyword "^(def|defdelegate|defexception|defguard|defguardp|defimpl|defmacro|defmacrop|defmodule|defn|defnp|defoverridable|defp|defprotocol|defstruct)$")) + (.match? @keyword "^(def|defdelegate|defexception|defguard|defguardp|defimpl|defmacro|defmacrop|defmodule|defn|defnp|defoverridable|defp|defprotocol|defstruct)$")) (call target: (identifier) @keyword - (#match? @keyword "^(alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$")) + (.match? @keyword "^(alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$")) ( (identifier) @constant.builtin - (#match? @constant.builtin "^(__MODULE__|__DIR__|__ENV__|__CALLER__|__STACKTRACE__)$") + (.match? @constant.builtin "^(__MODULE__|__DIR__|__ENV__|__CALLER__|__STACKTRACE__)$") ) (unary_operator @@ -121,7 +121,7 @@ (sigil) (boolean) ] @comment.doc)) - (#match? @__attribute__ "^(moduledoc|typedoc|doc)$")) + (.match? @__attribute__ "^(moduledoc|typedoc|doc)$")) (comment) @comment @@ -150,4 +150,4 @@ ((sigil (sigil_name) @_sigil_name (quoted_content) @embedded) - (#eq? @_sigil_name "H")) + (.eq? @_sigil_name "H")) diff --git a/crates/zed/src/languages/elixir/injections.scm b/crates/zed/src/languages/elixir/injections.scm index 4de229f104..5d445a7b82 100644 --- a/crates/zed/src/languages/elixir/injections.scm +++ b/crates/zed/src/languages/elixir/injections.scm @@ -3,5 +3,5 @@ ((sigil (sigil_name) @_sigil_name (quoted_content) @content) - (#eq? @_sigil_name "H") - (#set! language "heex")) + (.eq? @_sigil_name "H") + (.set! language "heex")) diff --git a/crates/zed/src/languages/elixir/outline.scm b/crates/zed/src/languages/elixir/outline.scm index a3311fb6d4..756d396510 100644 --- a/crates/zed/src/languages/elixir/outline.scm +++ b/crates/zed/src/languages/elixir/outline.scm @@ -1,7 +1,7 @@ (call target: (identifier) @context (arguments (alias) @name) - (#match? @context "^(defmodule|defprotocol)$")) @item + (.match? @context "^(defmodule|defprotocol)$")) @item (call target: (identifier) @context @@ -23,4 +23,4 @@ ")" @context.extra)) operator: "when") ]) - (#match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item + (.match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item diff --git a/crates/zed/src/languages/elm/injections.scm b/crates/zed/src/languages/elm/injections.scm index 0567320675..3456f59a04 100644 --- a/crates/zed/src/languages/elm/injections.scm +++ b/crates/zed/src/languages/elm/injections.scm @@ -1,2 +1,2 @@ ((glsl_content) @content - (#set! "language" "glsl")) + (.set! "language" "glsl")) diff --git a/crates/zed/src/languages/erb/injections.scm b/crates/zed/src/languages/erb/injections.scm index 7a69a818ef..d9801015b7 100644 --- a/crates/zed/src/languages/erb/injections.scm +++ b/crates/zed/src/languages/erb/injections.scm @@ -1,7 +1,7 @@ ((code) @content - (#set! "language" "ruby") - (#set! "combined")) + (.set! "language" "ruby") + (.set! "combined")) ((content) @content - (#set! "language" "html") - (#set! "combined")) + (.set! "language" "html") + (.set! "combined")) diff --git a/crates/zed/src/languages/glsl/highlights.scm b/crates/zed/src/languages/glsl/highlights.scm index e4503c6fbb..2378b8449b 100644 --- a/crates/zed/src/languages/glsl/highlights.scm +++ b/crates/zed/src/languages/glsl/highlights.scm @@ -74,7 +74,7 @@ (sized_type_specifier) @type ((identifier) @constant - (#match? @constant "^[A-Z][A-Z\\d_]*$")) + (.match? @constant "^[A-Z][A-Z\\d_]*$")) (identifier) @variable @@ -114,5 +114,5 @@ ( (identifier) @variable.builtin - (#match? @variable.builtin "^gl_") + (.match? @variable.builtin "^gl_") ) diff --git a/crates/zed/src/languages/heex/injections.scm b/crates/zed/src/languages/heex/injections.scm index b503bcb28d..1b63005cbf 100644 --- a/crates/zed/src/languages/heex/injections.scm +++ b/crates/zed/src/languages/heex/injections.scm @@ -5,9 +5,9 @@ (expression_value) (ending_expression_value) ] @content) - (#set! language "elixir") - (#set! combined) + (.set! language "elixir") + (.set! combined) ) ((expression (expression_value) @content) - (#set! language "elixir")) + (.set! language "elixir")) diff --git a/crates/zed/src/languages/html/injections.scm b/crates/zed/src/languages/html/injections.scm index 9084e373f2..7d2ed0a225 100644 --- a/crates/zed/src/languages/html/injections.scm +++ b/crates/zed/src/languages/html/injections.scm @@ -1,7 +1,7 @@ (script_element (raw_text) @content - (#set! "language" "javascript")) + (.set! "language" "javascript")) (style_element (raw_text) @content - (#set! "language" "css")) + (.set! "language" "css")) diff --git a/crates/zed/src/languages/javascript/highlights.scm b/crates/zed/src/languages/javascript/highlights.scm index 36ab21ca1e..7761bbb3a2 100644 --- a/crates/zed/src/languages/javascript/highlights.scm +++ b/crates/zed/src/languages/javascript/highlights.scm @@ -44,7 +44,7 @@ ; Special identifiers ((identifier) @type - (#match? @type "^[A-Z]")) + (.match? @type "^[A-Z]")) (type_identifier) @type (predefined_type) @type.builtin @@ -53,7 +53,7 @@ (shorthand_property_identifier) (shorthand_property_identifier_pattern) ] @constant - (#match? @constant "^_*[A-Z_][A-Z\\d_]*$")) +(.match? @constant "^_*[A-Z_][A-Z\\d_]*$")) ; Literals @@ -214,4 +214,4 @@ "type" "readonly" "override" -] @keyword \ No newline at end of file +] @keyword diff --git a/crates/zed/src/languages/lua/highlights.scm b/crates/zed/src/languages/lua/highlights.scm index 60ca9de36b..e00d0b9557 100644 --- a/crates/zed/src/languages/lua/highlights.scm +++ b/crates/zed/src/languages/lua/highlights.scm @@ -127,7 +127,7 @@ (identifier) @variable ((identifier) @variable.special - (#eq? @variable.special "self")) + (.eq? @variable.special "self")) (variable_list attribute: (attribute @@ -137,7 +137,7 @@ ;; Constants ((identifier) @constant - (#match? @constant "^[A-Z][A-Z_0-9]*$")) + (.match? @constant "^[A-Z][A-Z_0-9]*$")) (vararg_expression) @constant @@ -180,7 +180,7 @@ (function_call (identifier) @function.builtin - (#any-of? @function.builtin + (.any-of? @function.builtin ;; built-in functions in Lua 5.1 "assert" "collectgarbage" "dofile" "error" "getfenv" "getmetatable" "ipairs" "load" "loadfile" "loadstring" "module" "next" "pairs" "pcall" "print" diff --git a/crates/zed/src/languages/php/highlights.scm b/crates/zed/src/languages/php/highlights.scm index cfb03cbcca..fb85d997fa 100644 --- a/crates/zed/src/languages/php/highlights.scm +++ b/crates/zed/src/languages/php/highlights.scm @@ -43,15 +43,15 @@ (relative_scope) @variable.builtin ((name) @constant - (#match? @constant "^_?[A-Z][A-Z\\d_]+$")) + (.match? @constant "^_?[A-Z][A-Z\\d_]+$")) ((name) @constant.builtin - (#match? @constant.builtin "^__[A-Z][A-Z\d_]+__$")) + (.match? @constant.builtin "^__[A-Z][A-Z\d_]+__$")) ((name) @method.constructor -(#match? @method.constructor "^[A-Z]")) +(.match? @method.constructor "^[A-Z]")) ((name) @variable.builtin - (#eq? @variable.builtin "this")) + (.eq? @variable.builtin "this")) (variable_name) @variable diff --git a/crates/zed/src/languages/php/injections.scm b/crates/zed/src/languages/php/injections.scm index 57abd8ea2b..725729337b 100644 --- a/crates/zed/src/languages/php/injections.scm +++ b/crates/zed/src/languages/php/injections.scm @@ -1,3 +1,3 @@ ((text) @content - (#set! "language" "html") - (#set! "combined")) + (.set! "language" "html") + (.set! "combined")) diff --git a/crates/zed/src/languages/python/highlights.scm b/crates/zed/src/languages/python/highlights.scm index 71ab963d82..b31bddaeb5 100644 --- a/crates/zed/src/languages/python/highlights.scm +++ b/crates/zed/src/languages/python/highlights.scm @@ -18,16 +18,16 @@ ; Identifier naming conventions ((identifier) @type - (#match? @type "^[A-Z]")) + (.match? @type "^[A-Z]")) ((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) + (.match? @constant "^_*[A-Z][A-Z\\d_]*$")) ; Builtin functions ((call function: (identifier) @function.builtin) - (#match? + (.match? @function.builtin "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$")) @@ -122,4 +122,4 @@ "yield" "match" "case" -] @keyword \ No newline at end of file +] @keyword diff --git a/crates/zed/src/languages/racket/highlights.scm b/crates/zed/src/languages/racket/highlights.scm index 2c0caf8935..304b10a018 100644 --- a/crates/zed/src/languages/racket/highlights.scm +++ b/crates/zed/src/languages/racket/highlights.scm @@ -22,7 +22,7 @@ (lang_name) @variable.special ((symbol) @operator - (#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$")) + (.match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$")) (list . @@ -31,10 +31,9 @@ (list . (symbol) @keyword - (#match? @keyword + (.match? @keyword "^(unit-from-context|for/last|syntax-case|match-let\\*-values|define-for-syntax|define/subexpression-pos-prop|set-field!|class-field-accessor|invoke-unit|#%stratified-body|for\\*/and|for\\*/weak-set|flat-rec-contract|for\\*/stream|planet|for/mutable-seteqv|log-error|delay|#%declare|prop:dict/contract|->d|lib|override\\*|define-local-member-name|send-generic|for\\*/hasheq|define-syntax|submod|except|include-at/relative-to/reader|public\\*|define-member-name|define/public|let\\*|for/and|for\\*/first|for|delay/strict|define-values-for-export|==|match-define-values|for/weak-seteq|for\\*/async|for/stream|for/weak-seteqv|set!-values|lambda|for\\*/product|augment-final\\*|pubment\\*|command-line|contract|case|struct-field-index|contract-struct|unless|for/hasheq|for/seteqv|with-method|define-values-for-syntax|for-template|pubment|for\\*/list|syntax-case\\*|init-field|define-serializable-class|=>|for/foldr/derived|letrec-syntaxes|overment\\*|unquote-splicing|_|inherit-field|for\\*|stream-lazy|match-lambda\\*|contract-pos/neg-doubling|unit/c|match-define|for\\*/set|unit/s|nor|#%expression|class/c|this%|place/context|super-make-object|when|set!|parametric->/c|syntax-id-rules|include/reader|compound-unit|override-final|get-field|gen:dict|for\\*/seteqv|for\\*/hash|#%provide|combine-out|link|with-contract-continuation-mark|define-struct/derived|stream\\*|λ|rename-out|define-serializable-class\\*|augment|define/augment|let|define-signature-form|letrec-syntax|abstract|define-namespace-anchor|#%module-begin|#%top-interaction|for\\*/weak-seteqv|do|define/subexpression-pos-prop/name|absent|send/apply|with-handlers\\*|all-from-out|provide-signature-elements|gen:stream|define/override-final|for\\*/mutable-seteqv|rename|quasisyntax/loc|instantiate|for/list|extends|include-at/relative-to|mixin|define/pubment|#%plain-lambda|except-out|#%plain-module-begin|init|for\\*/last|relative-in|define-unit/new-import-export|->dm|member-name-key|nand|interface\\*|struct|define/override|else|define/augment-final|failure-cont|open|log-info|define/final-prop|all-defined-out|for/sum|for\\*/sum|recursive-contract|define|define-logger|match\\*|log-debug|rename-inner|->|struct/derived|unit|class\\*|prefix-out|any|define/overment|define-signature|match-letrec-values|let-syntaxes|for/mutable-set|define/match|cond|super-instantiate|define-contract-struct|import|hash/dc|define-custom-set-types|public-final|for/vector|for-label|prefix-in|for\\*/foldr/derived|define-unit-binding|object-contract|syntax-rules|augride|for\\*/mutable-seteq|quasisyntax|inner|for-syntax|overment|send/keyword-apply|generic|let\\*-values|->m|define-values|struct-copy|init-depend|struct/ctc|match-lambda|#%printing-module-begin|match\\*/derived|case->m|this|file|stream-cons|inspect|field|for/weak-set|struct\\*|gen:custom-write|thunk\\*|combine-in|unquote|for/lists|define/private|for\\*/foldr|define-unit/s|with-continuation-mark|begin|prefix|quote-syntax/prune|object/c|interface|match/derived|for/hasheqv|current-contract-region|define-compound-unit|override|define/public-final|recontract-out|let/cc|augride\\*|inherit|send|define-values/invoke-unit|for/mutable-seteq|#%datum|for/first|match-let\\*|invoke-unit/infer|define/contract|syntax/loc|for\\*/hasheqv|define-sequence-syntax|let/ec|for/product|for\\*/fold/derived|define-syntax-rule|lazy|unconstrained-domain->|augment-final|private|class|define-splicing-for-clause-syntax|for\\*/fold|prompt-tag/c|contract-out|match/values|public-final\\*|case-lambda|for/fold|unsyntax|for/set|begin0|#%require|time|public|define-struct|include|define-values/invoke-unit/infer|only-space-in|struct/c|only-meta-in|unit/new-import-export|place|begin-for-syntax|shared|inherit/super|quote|for/or|struct/contract|export|inherit/inner|struct-out|let-syntax|augment\\*|for\\*/vector|rename-in|match-let|define-unit|:do-in|~@|for\\*/weak-seteq|private\\*|and|except-in|log-fatal|gen:equal\\+hash|provide|require|thunk|invariant-assertion|define-match-expander|init-rest|->\\*|class/derived|super-new|for/fold/derived|for\\*/mutable-set|match-lambda\\*\\*|only|with-contract|~\\?|opt/c|let-values|delay/thread|->i|for/foldr|for-meta|only-in|send\\+|\\.\\.\\.|struct-guard/c|->\\*m|gen:set|struct/dc|define-syntaxes|if|parameterize|module\\*|module|send\\*|#%variable-reference|compound-unit/infer|#%plain-app|for/hash|contracted|case->|match|for\\*/lists|#%app|letrec-values|log-warning|super|define/augride|local-require|provide/contract|define-struct/contract|match-let-values|quote-syntax|for\\*/seteq|define-compound-unit/infer|parameterize\\*|values/drop|for/seteq|tag|stream|delay/idle|module\\+|define-custom-hash-types|cons/dc|define-module-boundary-contract|or|protect-out|define-opt/c|implies|letrec-syntaxes\\+values|for\\*/or|unsyntax-splicing|override-final\\*|for/async|parameterize-break|syntax|place\\*|for-space|quasiquote|with-handlers|delay/sync|define-unit-from-context|match-letrec|#%top|define-unit/contract|delay/name|new|field-bound\\?|letrec|class-field-mutator|with-syntax|flat-murec-contract|rename-super|local)$" )) ((symbol) @comment - (#match? @comment "^#[cC][iIsS]$")) - + (.match? @comment "^#[cC][iIsS]$")) diff --git a/crates/zed/src/languages/racket/outline.scm b/crates/zed/src/languages/racket/outline.scm index 604e052a63..188067078d 100644 --- a/crates/zed/src/languages/racket/outline.scm +++ b/crates/zed/src/languages/racket/outline.scm @@ -6,5 +6,5 @@ (symbol) @name (list . (symbol) @name) ] - (#match? @start-symbol "^define") -) @item \ No newline at end of file + (.match? @start-symbol "^define") +) @item diff --git a/crates/zed/src/languages/ruby/brackets.scm b/crates/zed/src/languages/ruby/brackets.scm index 957b20ecdb..f5129f8f31 100644 --- a/crates/zed/src/languages/ruby/brackets.scm +++ b/crates/zed/src/languages/ruby/brackets.scm @@ -11,4 +11,4 @@ (begin "begin" @open "end" @close) (module "module" @open "end" @close) (_ . "def" @open "end" @close) -(_ . "class" @open "end" @close) \ No newline at end of file +(_ . "class" @open "end" @close) diff --git a/crates/zed/src/languages/ruby/highlights.scm b/crates/zed/src/languages/ruby/highlights.scm index 2610cfa1cc..93cf2608f4 100644 --- a/crates/zed/src/languages/ruby/highlights.scm +++ b/crates/zed/src/languages/ruby/highlights.scm @@ -33,12 +33,12 @@ (identifier) @variable ((identifier) @keyword - (#match? @keyword "^(private|protected|public)$")) + (.match? @keyword "^(private|protected|public)$")) ; Function calls ((identifier) @function.method.builtin - (#eq? @function.method.builtin "require")) + (.eq? @function.method.builtin "require")) "defined?" @function.method.builtin @@ -60,7 +60,7 @@ ] @property ((identifier) @constant.builtin - (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$")) + (.match? @constant.builtin "^__(FILE|LINE|ENCODING)__$")) (file) @constant.builtin (line) @constant.builtin @@ -71,7 +71,7 @@ ) @constant.builtin ((constant) @constant - (#match? @constant "^[A-Z\\d_]+$")) + (.match? @constant "^[A-Z\\d_]+$")) (constant) @type diff --git a/crates/zed/src/languages/rust/highlights.scm b/crates/zed/src/languages/rust/highlights.scm index 7240173a89..54dbfa00bd 100644 --- a/crates/zed/src/languages/rust/highlights.scm +++ b/crates/zed/src/languages/rust/highlights.scm @@ -38,11 +38,11 @@ ; Assume uppercase names are types/enum-constructors ((identifier) @type - (#match? @type "^[A-Z]")) + (.match? @type "^[A-Z]")) ; Assume all-caps names are constants ((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) + (.match? @constant "^_*[A-Z][A-Z\\d_]*$")) [ "(" diff --git a/crates/zed/src/languages/rust/injections.scm b/crates/zed/src/languages/rust/injections.scm index 57ebea8539..78fde3752f 100644 --- a/crates/zed/src/languages/rust/injections.scm +++ b/crates/zed/src/languages/rust/injections.scm @@ -1,7 +1,7 @@ (macro_invocation (token_tree) @content - (#set! "language" "rust")) + (.set! "language" "rust")) (macro_rule (token_tree) @content - (#set! "language" "rust")) \ No newline at end of file + (.set! "language" "rust")) diff --git a/crates/zed/src/languages/scheme/highlights.scm b/crates/zed/src/languages/scheme/highlights.scm index 40ba61cd05..201b0e9276 100644 --- a/crates/zed/src/languages/scheme/highlights.scm +++ b/crates/zed/src/languages/scheme/highlights.scm @@ -14,7 +14,7 @@ (directive)] @comment ((symbol) @operator - (#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$")) + (.match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$")) (list . @@ -23,6 +23,6 @@ (list . (symbol) @keyword - (#match? @keyword + (.match? @keyword "^(define-syntax|let\\*|lambda|λ|case|=>|quote-splicing|unquote-splicing|set!|let|letrec|letrec-syntax|let-values|let\\*-values|do|else|define|cond|syntax-rules|unquote|begin|quote|let-syntax|and|if|quasiquote|letrec|delay|or|when|unless|identifier-syntax|assert|library|export|import|rename|only|except|prefix)$" )) diff --git a/crates/zed/src/languages/scheme/outline.scm b/crates/zed/src/languages/scheme/outline.scm index 604e052a63..188067078d 100644 --- a/crates/zed/src/languages/scheme/outline.scm +++ b/crates/zed/src/languages/scheme/outline.scm @@ -6,5 +6,5 @@ (symbol) @name (list . (symbol) @name) ] - (#match? @start-symbol "^define") -) @item \ No newline at end of file + (.match? @start-symbol "^define") +) @item diff --git a/crates/zed/src/languages/svelte/injections.scm b/crates/zed/src/languages/svelte/injections.scm index 8c1ac9fcd0..17719b325c 100755 --- a/crates/zed/src/languages/svelte/injections.scm +++ b/crates/zed/src/languages/svelte/injections.scm @@ -2,27 +2,27 @@ ; -------------- (script_element (raw_text) @content - (#set! "language" "javascript")) + (.set! "language" "javascript")) ((script_element (start_tag (attribute (quoted_attribute_value (attribute_value) @_language))) (raw_text) @content) - (#eq? @_language "ts") - (#set! "language" "typescript")) + (.eq? @_language "ts") + (.set! "language" "typescript")) ((script_element (start_tag (attribute (quoted_attribute_value (attribute_value) @_language))) (raw_text) @content) - (#eq? @_language "typescript") - (#set! "language" "typescript")) + (.eq? @_language "typescript") + (.set! "language" "typescript")) (style_element (raw_text) @content - (#set! "language" "css")) + (.set! "language" "css")) ((raw_text_expr) @content - (#set! "language" "javascript")) + (.set! "language" "javascript")) diff --git a/crates/zed/src/languages/typescript/highlights.scm b/crates/zed/src/languages/typescript/highlights.scm index ba6b329e0e..9272108670 100644 --- a/crates/zed/src/languages/typescript/highlights.scm +++ b/crates/zed/src/languages/typescript/highlights.scm @@ -44,10 +44,10 @@ ; Special identifiers ((identifier) @method.constructor - (#match? @method.constructor "^[A-Z]")) + (.match? @method.constructor "^[A-Z]")) ((identifier) @type - (#match? @type "^[A-Z]")) + (.match? @type "^[A-Z]")) (type_identifier) @type (predefined_type) @type.builtin @@ -56,7 +56,7 @@ (shorthand_property_identifier) (shorthand_property_identifier_pattern) ] @constant - (#match? @constant "^_*[A-Z_][A-Z\\d_]*$")) +(.match? @constant "^_*[A-Z_][A-Z\\d_]*$")) ; Literals