From 550b048a4b9ea462c0ea76e140566cc57654c361 Mon Sep 17 00:00:00 2001 From: E Dunbar Date: Fri, 2 May 2025 15:06:53 -0500 Subject: [PATCH] Added better macro highlighting --- queries/highlights.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 95d43a9..508db08 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -16,7 +16,7 @@ ((symbol) @constant.builtin (#any-of? @constant.builtin ; https://docs.python.org/3/library/constants.html - "NotImplemented" "Ellipsis" "quit" "exit" "copyright" "credits" "license")) + "NotImplemented" "Ellipsis" "quit" "exit" "copyright" "credits" "license" "...")) ((symbol) @character.special (#eq? @character.special "_")) @@ -38,7 +38,7 @@ . (list (symbol)* @parameter) - (#eq? @keyword.function "defn")) + (#any-of? @keyword.function "defn" "defmacro" "defmacro!" "defreader")) (expression . @@ -80,6 +80,15 @@ "-" "-=" "!=" "*" "**" "**=" "*=" "/" "//" "//=" "/=" "&" "&=" "%" "%=" "^" "^=" "+" "+=" "<" "<<" "<<=" "<=" "<>" "=" ">" ">=" ">>" ">>=" "@" "@=" "|" "|=")) +[ + "'" + "`" + "~" + "~@" + "#*" + "#**" +] @punctuation.special + [ "(" ")" @@ -185,5 +194,5 @@ (#any-of? @function.macro "do" "do-mac" "eval-and-compile" "eval-when-compile" "py" "pys" "pragma" "quote" "quasiquote" "unquote" "unquote-splice" "setv" "setx" "let" "global" "nonlocal" "del" "annotate" "deftype" - "unpack-iterable" "unpack-mapping" "defmacro" "defreader" "get-macro" "local-macros" "export" + "unpack-iterable" "unpack-mapping" "get-macro" "local-macros" "export" "get" "cut"))