summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-05-16 23:01:47 +0200
committerStephan Seitz <stephan.lauf@yahoo.de>2021-05-17 20:45:31 +0200
commit355d1e54abb24e584b8638091ee894a5edbcfa47 (patch)
tree231a2a4ff032255728b7f16918ddc07d4e61a4b9
parent048317174c61eb56a01746265e5e5328ed4110a3 (diff)
highlights(commonlisp): use any-of?
-rw-r--r--queries/commonlisp/highlights.scm48
1 files changed, 46 insertions, 2 deletions
diff --git a/queries/commonlisp/highlights.scm b/queries/commonlisp/highlights.scm
index 841798c5..56b2f2d1 100644
--- a/queries/commonlisp/highlights.scm
+++ b/queries/commonlisp/highlights.scm
@@ -111,7 +111,39 @@
.
(sym_lit) @function.macro
;; For a complete and more efficient version install theHamsta/nvim-treesitter-commonlisp
- (#match? @function.macro "^(let|function|the|unwind-protect|labels|flet|tagbody|go|(symbol-)?macrolet|progn|prog1|error|or|and|defvar|defparameter|in-package|defpackage|[e]?(type)?case|defstruct|defclass|if|if-let|when-let|when|unless|cond|switch|declaim|optimize)[*]?$"))
+ (#match? @function.macro
+ "let"
+ "function"
+ "the"
+ "unwind-protect"
+ "labels"
+ "flet"
+ "tagbody"
+ "go"
+ "symbol-macrolet"
+ "symbol-macrolet"
+ "progn"
+ "prog1"
+ "error"
+ "or"
+ "and"
+ "defvar"
+ "defparameter"
+ "in-package"
+ "defpackage"
+ "case"
+ "ecase"
+ "typecase"
+ "etypecase"
+ "defstruct"
+ "defclass"
+ "if"
+ "when"
+ "unless"
+ "cond"
+ "switch"
+ "declaim"
+ "optimize"))
;; constant
((sym_lit) @constant
@@ -127,7 +159,19 @@
.
(sym_lit) @function.builtin
;; For a complete and more efficient version install theHamsta/nvim-treesitter-commonlisp
- (#match? @function.builtin "^(mapcar|reduce|remove-if-not|cons|car|last|nth|equal[p]?|cdr|first|rest|format)$"))
+ (#any-of? @function.builtin
+ "mapcar"
+ "reduce"
+ "remove-if-not"
+ "cons"
+ "car"
+ "last"
+ "nth"
+ "equal"
+ "cdr"
+ "first"
+ "rest"
+ "format"))
(list_lit
.