diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-21 04:06:20 -0400 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-21 18:24:17 -0400 |
| commit | 85330918f05b3a4bd342a69063e7ef5fcdfadd2e (patch) | |
| tree | 6b38f8e3af9ad1079ba94ffc7056263b056d0c00 /queries/clojure | |
| parent | fix(c): types are optional in sized_type_specifier (diff) | |
| download | nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.gz nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.bz2 nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.lz nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.xz nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.zst nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.zip | |
perf: remove match where possible
Diffstat (limited to 'queries/clojure')
| -rw-r--r-- | queries/clojure/highlights.scm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/queries/clojure/highlights.scm b/queries/clojure/highlights.scm index a070b7ffd..69b9abd9d 100644 --- a/queries/clojure/highlights.scm +++ b/queries/clojure/highlights.scm @@ -59,28 +59,28 @@ ; Inline function variables ((sym_lit) @variable.builtin - (#match? @variable.builtin "^[%]")) + (#lua-match? @variable.builtin "^%%")) ; Constructor ((sym_lit) @constructor - (#match? @constructor "^-\\>[^\\>].*")) + (#lua-match? @constructor "^-\\>[^\\>].*")) ; Dynamic variables ((sym_lit) @variable.builtin - (#match? @variable.builtin "^[*].+[*]$")) + (#lua-match? @variable.builtin "^[*].+[*]$")) ; Gensym ;; Might not be needed ((sym_lit) @variable - (#match? @variable "^.*#$")) + (#lua-match? @variable "^.*#$")) ; Types ;; TODO: improve? ((sym_lit) @type - (#match? @type "^[A-Z][^/]*$")) + (#lua-match? @type "^[%u][^/]*$")) ;; Symbols with `.` but not `/` ((sym_lit) @type - (#match? @type "^[^/]+[.][^/]*$")) + (#lua-match? @type "^[^/]+[.][^/]*$")) ; Interop ((sym_lit) @method @@ -88,11 +88,11 @@ ((sym_lit) @field (#match? @field "^\\.-")) ((sym_lit) @field - (#match? @field "^[A-Z].*/.+")) + (#lua-match? @field "^[%u].*/.+")) (list_lit . (sym_lit) @method - (#match? @method "^[A-Z].*/.+")) + (#lua-match? @method "^[%u].*/.+")) ;; TODO: Special casing for the `.` macro ; Operators |
