feat(format-scripts): linewrap predicates

"format-ignore".kick()
This commit is contained in:
再生花 2024-02-23 17:42:01 +09:00 committed by GitHub
parent a29058fe8b
commit 31641d72a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 1622 additions and 1537 deletions

View file

@ -1,74 +1,31 @@
; inherits: cpp
((identifier) @function.builtin
; format-ignore
(#any-of? @function.builtin
; Digital I/O
"digitalRead"
"digitalWrite"
"pinMode"
; Analog I/O
"analogRead"
"analogReference"
"analogWrite"
; Zero, Due & MKR Family
"analogReadResolution"
"analogWriteResolution"
; Advanced I/O
"noTone"
"pulseIn"
"pulseInLong"
"shiftIn"
"shiftOut"
"tone"
; Time
"delay"
"delayMicroseconds"
"micros"
"millis"
; Math
"abs"
"constrain"
"map"
"max"
"min"
"pow"
"sq"
"sqrt"
; Trigonometry
"cos"
"sin"
"tan"
; Characters
"isAlpha"
"isAlphaNumeric"
"isAscii"
"isControl"
"isDigit"
"isGraph"
"isHexadecimalDigit"
"isLowerCase"
"isPrintable"
"isPunct"
"isSpace"
"isUpperCase"
"isWhitespace"
; Random Numbers
"random"
"randomSeed"
; Bits and Bytes
"bit"
"bitClear"
"bitRead"
"bitSet"
"bitWrite"
"highByte"
"lowByte"
; External Interrupts
"attachInterrupt"
"detachInterrupt"
; Interrupts
"interrupts"
"noInterrupts"))
; Digital I/O
"digitalRead" "digitalWrite" "pinMode"
; Analog I/O
"analogRead" "analogReference" "analogWrite"
; Zero, Due & MKR Family
"analogReadResolution" "analogWriteResolution"
; Advanced I/O
"noTone" "pulseIn" "pulseInLong" "shiftIn" "shiftOut" "tone"
; Time
"delay" "delayMicroseconds" "micros" "millis"
; Math
"abs" "constrain" "map" "max" "min" "pow" "sq" "sqrt"
; Trigonometry
"cos" "sin" "tan"
; Characters
"isAlpha" "isAlphaNumeric" "isAscii" "isControl" "isDigit" "isGraph" "isHexadecimalDigit"
"isLowerCase" "isPrintable" "isPunct" "isSpace" "isUpperCase" "isWhitespace"
; Random Numbers
"random" "randomSeed"
; Bits and Bytes
"bit" "bitClear" "bitRead" "bitSet" "bitWrite" "highByte" "lowByte"
; External Interrupts
"attachInterrupt" "detachInterrupt"
; Interrupts
"interrupts" "noInterrupts"))
((identifier) @type.builtin
(#any-of? @type.builtin "Serial" "SPI" "Stream" "Wire" "Keyboard" "Mouse" "String"))

View file

@ -9,11 +9,15 @@
; https://www.gnu.org/software/gawk/manual/html_node/Auto_002dset.html
((identifier) @constant.builtin
(#any-of? @constant.builtin "ARGC" "ARGV" "ARGIND" "ENVIRON" "ERRNO" "FILENAME" "FNR" "NF" "FUNCTAB" "NR" "PROCINFO" "RLENGTH" "RSTART" "RT" "SYMTAB"))
(#any-of? @constant.builtin
"ARGC" "ARGV" "ARGIND" "ENVIRON" "ERRNO" "FILENAME" "FNR" "NF" "FUNCTAB" "NR" "PROCINFO"
"RLENGTH" "RSTART" "RT" "SYMTAB"))
; https://www.gnu.org/software/gawk/manual/html_node/User_002dmodified.html
((identifier) @variable.builtin
(#any-of? @variable.builtin "BINMODE" "CONVFMT" "FIELDWIDTHS" "FPAT" "FS" "IGNORECASE" "LINT" "OFMT" "OFS" "ORS" "PREC" "ROUNDMODE" "RS" "SUBSEP" "TEXTDOMAIN"))
(#any-of? @variable.builtin
"BINMODE" "CONVFMT" "FIELDWIDTHS" "FPAT" "FS" "IGNORECASE" "LINT" "OFMT" "OFS" "ORS" "PREC"
"ROUNDMODE" "RS" "SUBSEP" "TEXTDOMAIN"))
(number) @number

View file

@ -106,7 +106,15 @@
; trap -l
((word) @constant.builtin
(#match? @constant.builtin "^SIG(HUP|INT|QUIT|ILL|TRAP|ABRT|BUS|FPE|KILL|USR[12]|SEGV|PIPE|ALRM|TERM|STKFLT|CHLD|CONT|STOP|TSTP|TT(IN|OU)|URG|XCPU|XFSZ|VTALRM|PROF|WINCH|IO|PWR|SYS|RTMIN([+]([1-9]|1[0-5]))?|RTMAX(-([1-9]|1[0-4]))?)$"))
(#any-of? @constant.builtin
"SIGHUP" "SIGINT" "SIGQUIT" "SIGILL" "SIGTRAP" "SIGABRT" "SIGBUS" "SIGFPE" "SIGKILL" "SIGUSR1"
"SIGSEGV" "SIGUSR2" "SIGPIPE" "SIGALRM" "SIGTERM" "SIGSTKFLT" "SIGCHLD" "SIGCONT" "SIGSTOP"
"SIGTSTP" "SIGTTIN" "SIGTTOU" "SIGURG" "SIGXCPU" "SIGXFSZ" "SIGVTALRM" "SIGPROF" "SIGWINCH"
"SIGIO" "SIGPWR" "SIGSYS" "SIGRTMIN" "SIGRTMIN+1" "SIGRTMIN+2" "SIGRTMIN+3" "SIGRTMIN+4"
"SIGRTMIN+5" "SIGRTMIN+6" "SIGRTMIN+7" "SIGRTMIN+8" "SIGRTMIN+9" "SIGRTMIN+10" "SIGRTMIN+11"
"SIGRTMIN+12" "SIGRTMIN+13" "SIGRTMIN+14" "SIGRTMIN+15" "SIGRTMAX-14" "SIGRTMAX-13"
"SIGRTMAX-12" "SIGRTMAX-11" "SIGRTMAX-10" "SIGRTMAX-9" "SIGRTMAX-8" "SIGRTMAX-7" "SIGRTMAX-6"
"SIGRTMAX-5" "SIGRTMAX-4" "SIGRTMAX-3" "SIGRTMAX-2" "SIGRTMAX-1" "SIGRTMAX"))
((word) @boolean
(#any-of? @boolean "true" "false"))
@ -152,19 +160,14 @@
(command_name
(word) @function.call)
((command_name
(word) @function.builtin)
; format-ignore
(command_name
(word) @function.builtin
(#any-of? @function.builtin
"alias" "bg" "bind" "break" "builtin" "caller" "cd"
"command" "compgen" "complete" "compopt" "continue"
"coproc" "dirs" "disown" "echo" "enable" "eval"
"exec" "exit" "fc" "fg" "getopts" "hash" "help"
"history" "jobs" "kill" "let" "logout" "mapfile"
"popd" "printf" "pushd" "pwd" "read" "readarray"
"return" "set" "shift" "shopt" "source" "suspend"
"test" "time" "times" "trap" "type" "typeset"
"ulimit" "umask" "unalias" "wait"))
"alias" "bg" "bind" "break" "builtin" "caller" "cd" "command" "compgen" "complete" "compopt"
"continue" "coproc" "dirs" "disown" "echo" "enable" "eval" "exec" "exit" "fc" "fg" "getopts"
"hash" "help" "history" "jobs" "kill" "let" "logout" "mapfile" "popd" "printf" "pushd" "pwd"
"read" "readarray" "return" "set" "shift" "shopt" "source" "suspend" "test" "time" "times"
"trap" "type" "typeset" "ulimit" "umask" "unalias" "wait"))
(command
argument:

View file

@ -55,10 +55,23 @@
(#any-of? @keyword.function "def" "defop" "defn" "fn"))
((symbol) @function.builtin
(#any-of? @function.builtin "dump" "mkfs" "json" "log" "error" "now" "cons" "wrap" "unwrap" "eval" "make-scope" "bind" "meta" "with-meta" "null?" "ignore?" "boolean?" "number?" "string?" "symbol?" "scope?" "sink?" "source?" "list?" "pair?" "applicative?" "operative?" "combiner?" "path?" "empty?" "thunk?" "+" "*" "quot" "-" "max" "min" "=" ">" ">=" "<" "<=" "list->source" "across" "emit" "next" "reduce-kv" "assoc" "symbol->string" "string->symbol" "str" "substring" "trim" "scope->list" "string->fs-path" "string->cmd-path" "string->dir" "subpath" "path-name" "path-stem" "with-image" "with-dir" "with-args" "with-cmd" "with-stdin" "with-env" "with-insecure" "with-label" "with-port" "with-tls" "with-mount" "thunk-cmd" "thunk-args" "resolve" "start" "addr" "wait" "read" "cache-dir" "binds?" "recall-memo" "store-memo" "mask" "list" "list*" "first" "rest" "length" "second" "third" "map" "map-pairs" "foldr" "foldl" "append" "filter" "conj" "list->scope" "merge" "apply" "id" "always" "vals" "keys" "memo" "succeeds?" "run" "last" "take" "take-all" "insecure!" "from" "cd" "wrap-cmd" "mkfile" "path-base" "not"))
(#any-of? @function.builtin
"dump" "mkfs" "json" "log" "error" "now" "cons" "wrap" "unwrap" "eval" "make-scope" "bind"
"meta" "with-meta" "null?" "ignore?" "boolean?" "number?" "string?" "symbol?" "scope?" "sink?"
"source?" "list?" "pair?" "applicative?" "operative?" "combiner?" "path?" "empty?" "thunk?" "+"
"*" "quot" "-" "max" "min" "=" ">" ">=" "<" "<=" "list->source" "across" "emit" "next"
"reduce-kv" "assoc" "symbol->string" "string->symbol" "str" "substring" "trim" "scope->list"
"string->fs-path" "string->cmd-path" "string->dir" "subpath" "path-name" "path-stem"
"with-image" "with-dir" "with-args" "with-cmd" "with-stdin" "with-env" "with-insecure"
"with-label" "with-port" "with-tls" "with-mount" "thunk-cmd" "thunk-args" "resolve" "start"
"addr" "wait" "read" "cache-dir" "binds?" "recall-memo" "store-memo" "mask" "list" "list*"
"first" "rest" "length" "second" "third" "map" "map-pairs" "foldr" "foldl" "append" "filter"
"conj" "list->scope" "merge" "apply" "id" "always" "vals" "keys" "memo" "succeeds?" "run" "last"
"take" "take-all" "insecure!" "from" "cd" "wrap-cmd" "mkfile" "path-base" "not"))
((symbol) @function.macro
(#any-of? @function.macro "op" "current-scope" "quote" "let" "provide" "module" "or" "and" "curryfn" "for" "$" "linux"))
(#any-of? @function.macro
"op" "current-scope" "quote" "let" "provide" "module" "or" "and" "curryfn" "for" "$" "linux"))
; Conditionals
((symbol) @keyword.conditional

View file

@ -125,11 +125,9 @@
(#lua-match? @constant.builtin "^__[a-zA-Z0-9_]*__$"))
((python_identifier) @constant.builtin
; format-ignore
(#any-of? @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"))
((assignment
left: (python_identifier) @type.definition
@ -172,7 +170,14 @@
((call
function: (python_identifier) @function.builtin)
(#any-of? @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__"))
(#any-of? @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__"))
(python_function_definition
name: (python_identifier) @function)
@ -385,22 +390,23 @@
(identifier)
(python_identifier)
] @type.builtin
; format-ignore
(#any-of? @type.builtin
; https://docs.python.org/3/library/exceptions.html
"BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError"
"EOFError" "FloatingPointError" "GeneratorExit" "ImportError" "ModuleNotFoundError" "IndexError" "KeyError"
"KeyboardInterrupt" "MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError"
"ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError"
"SystemError" "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError"
"UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError"
"BlockingIOError" "ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError"
"ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError" "InterruptedError"
"IsADirectoryError" "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning"
"UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning"
"FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning"
; https://docs.python.org/3/library/stdtypes.html
"bool" "int" "float" "complex" "list" "tuple" "range" "str"
"bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type" "object"))
; https://docs.python.org/3/library/exceptions.html
"BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError"
"AttributeError" "EOFError" "FloatingPointError" "GeneratorExit" "ImportError"
"ModuleNotFoundError" "IndexError" "KeyError" "KeyboardInterrupt" "MemoryError" "NameError"
"NotImplementedError" "OSError" "OverflowError" "RecursionError" "ReferenceError" "RuntimeError"
"StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError" "SystemError"
"SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError"
"UnicodeDecodeError" "UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError"
"IOError" "WindowsError" "BlockingIOError" "ChildProcessError" "ConnectionError"
"BrokenPipeError" "ConnectionAbortedError" "ConnectionRefusedError" "ConnectionResetError"
"FileExistsError" "FileNotFoundError" "InterruptedError" "IsADirectoryError"
"NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning"
"UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning"
"FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning"
; https://docs.python.org/3/library/stdtypes.html
"bool" "int" "float" "complex" "list" "tuple" "range" "str" "bytes" "bytearray" "memoryview"
"set" "frozenset" "dict" "type" "object"))
(comment) @comment @spell

View file

@ -85,20 +85,14 @@
; Builtin dynamic variables
((sym_lit) @variable.builtin
; format-ignore
(#any-of? @variable.builtin
"*agent*" "*allow-unresolved-vars*" "*assert*"
"*clojure-version*" "*command-line-args*"
"*compile-files*" "*compile-path*" "*compiler-options*"
"*data-readers*" "*default-data-reader-fn*"
"*err*" "*file*" "*flush-on-newline*" "*fn-loader*"
"*in*" "*math-context*" "*ns*" "*out*"
"*print-dup*" "*print-length*" "*print-level*"
"*print-meta*" "*print-namespace-maps*" "*print-readably*"
"*read-eval*" "*reader-resolver*"
"*source-path*" "*suppress-read*"
"*unchecked-math*" "*use-context-classloader*"
"*verbose-defrecords*" "*warn-on-reflection*"))
"*agent*" "*allow-unresolved-vars*" "*assert*" "*clojure-version*" "*command-line-args*"
"*compile-files*" "*compile-path*" "*compiler-options*" "*data-readers*"
"*default-data-reader-fn*" "*err*" "*file*" "*flush-on-newline*" "*fn-loader*" "*in*"
"*math-context*" "*ns*" "*out*" "*print-dup*" "*print-length*" "*print-level*" "*print-meta*"
"*print-namespace-maps*" "*print-readably*" "*read-eval*" "*reader-resolver*" "*source-path*"
"*suppress-read*" "*unchecked-math*" "*use-context-classloader*" "*verbose-defrecords*"
"*warn-on-reflection*"))
; Builtin repl variables
((sym_lit) @variable.builtin
@ -148,13 +142,17 @@
; Definition functions
((sym_lit) @keyword
(#any-of? @keyword "def" "defonce" "defrecord" "defmacro" "definline" "definterface" "defmulti" "defmethod" "defstruct" "defprotocol" "deftype"))
(#any-of? @keyword
"def" "defonce" "defrecord" "defmacro" "definline" "definterface" "defmulti" "defmethod"
"defstruct" "defprotocol" "deftype"))
((sym_lit) @keyword
(#eq? @keyword "declare"))
((sym_name) @keyword.coroutine
(#any-of? @keyword.coroutine "alts!" "alts!!" "await" "await-for" "await1" "chan" "close!" "future" "go" "sync" "thread" "timeout" "<!" "<!!" ">!" ">!!"))
(#any-of? @keyword.coroutine
"alts!" "alts!!" "await" "await-for" "await1" "chan" "close!" "future" "go" "sync" "thread"
"timeout" "<!" "<!!" ">!" ">!!"))
((sym_lit) @keyword.function
(#any-of? @keyword.function "defn" "defn-" "fn" "fn*"))
@ -188,18 +186,13 @@
; Builtin macros
; TODO: Do all these items belong here?
((sym_lit) @function.macro
; format-ignore
(#any-of? @function.macro
"." ".." "->" "->>" "amap" "areduce" "as->" "assert"
"binding" "bound-fn" "delay" "do" "dosync"
"doto" "extend-protocol" "extend-type"
"gen-class" "gen-interface" "io!" "lazy-cat"
"lazy-seq" "let" "letfn" "locking" "memfn" "monitor-enter"
"monitor-exit" "proxy" "proxy-super" "pvalues"
"refer-clojure" "reify" "set!" "some->" "some->>"
"time" "unquote" "unquote-splicing" "var" "vswap!"
"with-bindings" "with-in-str" "with-loading-context" "with-local-vars"
"with-open" "with-out-str" "with-precision" "with-redefs"))
"." ".." "->" "->>" "amap" "areduce" "as->" "assert" "binding" "bound-fn" "delay" "do" "dosync"
"doto" "extend-protocol" "extend-type" "gen-class" "gen-interface" "io!" "lazy-cat" "lazy-seq"
"let" "letfn" "locking" "memfn" "monitor-enter" "monitor-exit" "proxy" "proxy-super" "pvalues"
"refer-clojure" "reify" "set!" "some->" "some->>" "time" "unquote" "unquote-splicing" "var"
"vswap!" "with-bindings" "with-in-str" "with-loading-context" "with-local-vars" "with-open"
"with-out-str" "with-precision" "with-redefs"))
; All builtin functions
; (->> (ns-publics *ns*)
@ -208,128 +201,82 @@
; clojure.pprint/pprint))
; ...and then lots of manual filtering...
((sym_lit) @function.builtin
; format-ignore
(#any-of? @function.builtin
"->ArrayChunk" "->Eduction" "->Vec" "->VecNode" "->VecSeq"
"-cache-protocol-fn" "-reset-methods" "PrintWriter-on"
"StackTraceElement->vec" "Throwable->map" "accessor"
"aclone" "add-classpath" "add-tap" "add-watch" "agent"
"agent-error" "agent-errors" "aget" "alength" "alias"
"all-ns" "alter" "alter-meta!" "alter-var-root" "ancestors"
"any?" "apply" "array-map" "aset" "aset-boolean" "aset-byte"
"aset-char" "aset-double" "aset-float" "aset-int"
"aset-long" "aset-short" "assoc" "assoc!" "assoc-in"
"associative?" "atom" "bases" "bean" "bigdec" "bigint" "biginteger"
"bit-and" "bit-and-not" "bit-clear" "bit-flip" "bit-not" "bit-or"
"bit-set" "bit-shift-left" "bit-shift-right" "bit-test"
"bit-xor" "boolean" "boolean-array" "boolean?"
"booleans" "bound-fn*" "bound?" "bounded-count"
"butlast" "byte" "byte-array" "bytes" "bytes?"
"cast" "cat" "char" "char-array" "char-escape-string"
"char-name-string" "char?" "chars" "chunk" "chunk-append"
"chunk-buffer" "chunk-cons" "chunk-first" "chunk-next"
"chunk-rest" "chunked-seq?" "class" "class?"
"clear-agent-errors" "clojure-version" "coll?"
"commute" "comp" "comparator" "compare" "compare-and-set!"
"compile" "complement" "completing" "concat" "conj"
"conj!" "cons" "constantly" "construct-proxy" "contains?"
"count" "counted?" "create-ns" "create-struct" "cycle"
"dec" "dec'" "decimal?" "dedupe" "default-data-readers"
"delay?" "deliver" "denominator" "deref" "derive"
"descendants" "destructure" "disj" "disj!" "dissoc"
"dissoc!" "distinct" "distinct?" "doall" "dorun" "double"
"double-array" "eduction" "empty" "empty?" "ensure" "ensure-reduced"
"enumeration-seq" "error-handler" "error-mode" "eval"
"even?" "every-pred" "every?" "extend" "extenders" "extends?"
"false?" "ffirst" "file-seq" "filter" "filterv" "find"
"find-keyword" "find-ns" "find-protocol-impl"
"find-protocol-method" "find-var" "first" "flatten"
"float" "float-array" "float?" "floats" "flush" "fn?"
"fnext" "fnil" "force" "format" "frequencies"
"future-call" "future-cancel" "future-cancelled?"
"future-done?" "future?" "gensym" "get" "get-in"
"get-method" "get-proxy-class" "get-thread-bindings"
"get-validator" "group-by" "halt-when" "hash"
"hash-combine" "hash-map" "hash-ordered-coll" "hash-set"
"hash-unordered-coll" "ident?" "identical?" "identity"
"ifn?" "in-ns" "inc" "inc'" "indexed?" "init-proxy"
"inst-ms" "inst-ms*" "inst?" "instance?" "int" "int-array"
"int?" "integer?" "interleave" "intern" "interpose" "into"
"into-array" "ints" "isa?" "iterate" "iterator-seq" "juxt"
"keep" "keep-indexed" "key" "keys" "keyword" "keyword?"
"last" "line-seq" "list" "list*" "list?" "load" "load-file"
"load-reader" "load-string" "loaded-libs" "long" "long-array"
"longs" "macroexpand" "macroexpand-1" "make-array" "make-hierarchy"
"map" "map-entry?" "map-indexed" "map?" "mapcat" "mapv"
"max" "max-key" "memoize" "merge" "merge-with" "meta"
"method-sig" "methods" "min" "min-key" "mix-collection-hash"
"mod" "munge" "name" "namespace" "namespace-munge" "nat-int?"
"neg-int?" "neg?" "newline" "next" "nfirst" "nil?" "nnext"
"not-any?" "not-empty" "not-every?" "ns-aliases"
"ns-imports" "ns-interns" "ns-map" "ns-name" "ns-publics"
"ns-refers" "ns-resolve" "ns-unalias" "ns-unmap" "nth"
"nthnext" "nthrest" "num" "number?" "numerator" "object-array"
"odd?" "parents" "partial" "partition" "partition-all"
"partition-by" "pcalls" "peek" "persistent!" "pmap" "pop"
"pop!" "pop-thread-bindings" "pos-int?" "pos?" "pr"
"pr-str" "prefer-method" "prefers" "primitives-classnames"
"print" "print-ctor" "print-dup" "print-method" "print-simple"
"print-str" "printf" "println" "println-str" "prn" "prn-str"
"promise" "proxy-call-with-super" "proxy-mappings" "proxy-name"
"push-thread-bindings" "qualified-ident?" "qualified-keyword?"
"qualified-symbol?" "quot" "rand" "rand-int" "rand-nth" "random-sample"
"range" "ratio?" "rational?" "rationalize" "re-find" "re-groups"
"re-matcher" "re-matches" "re-pattern" "re-seq" "read"
"read+string" "read-line" "read-string" "reader-conditional"
"reader-conditional?" "realized?" "record?" "reduce"
"reduce-kv" "reduced" "reduced?" "reductions" "ref" "ref-history-count"
"ref-max-history" "ref-min-history" "ref-set" "refer"
"release-pending-sends" "rem" "remove" "remove-all-methods"
"remove-method" "remove-ns" "remove-tap" "remove-watch"
"repeat" "repeatedly" "replace" "replicate"
"requiring-resolve" "reset!" "reset-meta!" "reset-vals!"
"resolve" "rest" "restart-agent" "resultset-seq" "reverse"
"reversible?" "rseq" "rsubseq" "run!" "satisfies?"
"second" "select-keys" "send" "send-off" "send-via"
"seq" "seq?" "seqable?" "seque" "sequence" "sequential?"
"set" "set-agent-send-executor!" "set-agent-send-off-executor!"
"set-error-handler!" "set-error-mode!" "set-validator!"
"set?" "short" "short-array" "shorts" "shuffle"
"shutdown-agents" "simple-ident?" "simple-keyword?"
"simple-symbol?" "slurp" "some" "some-fn" "some?"
"sort" "sort-by" "sorted-map" "sorted-map-by"
"sorted-set" "sorted-set-by" "sorted?" "special-symbol?"
"spit" "split-at" "split-with" "str" "string?"
"struct" "struct-map" "subs" "subseq" "subvec" "supers"
"swap!" "swap-vals!" "symbol" "symbol?" "tagged-literal"
"tagged-literal?" "take" "take-last" "take-nth" "take-while"
"tap>" "test" "the-ns" "thread-bound?" "to-array"
"to-array-2d" "trampoline" "transduce" "transient"
"tree-seq" "true?" "type" "unchecked-add" "unchecked-add-int"
"unchecked-byte" "unchecked-char" "unchecked-dec"
"unchecked-dec-int" "unchecked-divide-int" "unchecked-double"
"unchecked-float" "unchecked-inc" "unchecked-inc-int"
"unchecked-int" "unchecked-long" "unchecked-multiply"
"unchecked-multiply-int" "unchecked-negate" "unchecked-negate-int"
"unchecked-remainder-int" "unchecked-short" "unchecked-subtract"
"unchecked-subtract-int" "underive" "unquote"
"unquote-splicing" "unreduced" "unsigned-bit-shift-right"
"update" "update-in" "update-proxy" "uri?" "uuid?"
"val" "vals" "var-get" "var-set" "var?" "vary-meta" "vec"
"vector" "vector-of" "vector?" "volatile!" "volatile?"
"vreset!" "with-bindings*" "with-meta" "with-redefs-fn" "xml-seq"
"zero?" "zipmap"
;; earlier
"drop" "drop-last" "drop-while"
"double?" "doubles"
"ex-data" "ex-info"
;; 1.10
"->ArrayChunk" "->Eduction" "->Vec" "->VecNode" "->VecSeq" "-cache-protocol-fn" "-reset-methods"
"PrintWriter-on" "StackTraceElement->vec" "Throwable->map" "accessor" "aclone" "add-classpath"
"add-tap" "add-watch" "agent" "agent-error" "agent-errors" "aget" "alength" "alias" "all-ns"
"alter" "alter-meta!" "alter-var-root" "ancestors" "any?" "apply" "array-map" "aset"
"aset-boolean" "aset-byte" "aset-char" "aset-double" "aset-float" "aset-int" "aset-long"
"aset-short" "assoc" "assoc!" "assoc-in" "associative?" "atom" "bases" "bean" "bigdec" "bigint"
"biginteger" "bit-and" "bit-and-not" "bit-clear" "bit-flip" "bit-not" "bit-or" "bit-set"
"bit-shift-left" "bit-shift-right" "bit-test" "bit-xor" "boolean" "boolean-array" "boolean?"
"booleans" "bound-fn*" "bound?" "bounded-count" "butlast" "byte" "byte-array" "bytes" "bytes?"
"cast" "cat" "char" "char-array" "char-escape-string" "char-name-string" "char?" "chars" "chunk"
"chunk-append" "chunk-buffer" "chunk-cons" "chunk-first" "chunk-next" "chunk-rest"
"chunked-seq?" "class" "class?" "clear-agent-errors" "clojure-version" "coll?" "commute" "comp"
"comparator" "compare" "compare-and-set!" "compile" "complement" "completing" "concat" "conj"
"conj!" "cons" "constantly" "construct-proxy" "contains?" "count" "counted?" "create-ns"
"create-struct" "cycle" "dec" "dec'" "decimal?" "dedupe" "default-data-readers" "delay?"
"deliver" "denominator" "deref" "derive" "descendants" "destructure" "disj" "disj!" "dissoc"
"dissoc!" "distinct" "distinct?" "doall" "dorun" "double" "double-array" "eduction" "empty"
"empty?" "ensure" "ensure-reduced" "enumeration-seq" "error-handler" "error-mode" "eval" "even?"
"every-pred" "every?" "extend" "extenders" "extends?" "false?" "ffirst" "file-seq" "filter"
"filterv" "find" "find-keyword" "find-ns" "find-protocol-impl" "find-protocol-method" "find-var"
"first" "flatten" "float" "float-array" "float?" "floats" "flush" "fn?" "fnext" "fnil" "force"
"format" "frequencies" "future-call" "future-cancel" "future-cancelled?" "future-done?"
"future?" "gensym" "get" "get-in" "get-method" "get-proxy-class" "get-thread-bindings"
"get-validator" "group-by" "halt-when" "hash" "hash-combine" "hash-map" "hash-ordered-coll"
"hash-set" "hash-unordered-coll" "ident?" "identical?" "identity" "ifn?" "in-ns" "inc" "inc'"
"indexed?" "init-proxy" "inst-ms" "inst-ms*" "inst?" "instance?" "int" "int-array" "int?"
"integer?" "interleave" "intern" "interpose" "into" "into-array" "ints" "isa?" "iterate"
"iterator-seq" "juxt" "keep" "keep-indexed" "key" "keys" "keyword" "keyword?" "last" "line-seq"
"list" "list*" "list?" "load" "load-file" "load-reader" "load-string" "loaded-libs" "long"
"long-array" "longs" "macroexpand" "macroexpand-1" "make-array" "make-hierarchy" "map"
"map-entry?" "map-indexed" "map?" "mapcat" "mapv" "max" "max-key" "memoize" "merge" "merge-with"
"meta" "method-sig" "methods" "min" "min-key" "mix-collection-hash" "mod" "munge" "name"
"namespace" "namespace-munge" "nat-int?" "neg-int?" "neg?" "newline" "next" "nfirst" "nil?"
"nnext" "not-any?" "not-empty" "not-every?" "ns-aliases" "ns-imports" "ns-interns" "ns-map"
"ns-name" "ns-publics" "ns-refers" "ns-resolve" "ns-unalias" "ns-unmap" "nth" "nthnext"
"nthrest" "num" "number?" "numerator" "object-array" "odd?" "parents" "partial" "partition"
"partition-all" "partition-by" "pcalls" "peek" "persistent!" "pmap" "pop" "pop!"
"pop-thread-bindings" "pos-int?" "pos?" "pr" "pr-str" "prefer-method" "prefers"
"primitives-classnames" "print" "print-ctor" "print-dup" "print-method" "print-simple"
"print-str" "printf" "println" "println-str" "prn" "prn-str" "promise" "proxy-call-with-super"
"proxy-mappings" "proxy-name" "push-thread-bindings" "qualified-ident?" "qualified-keyword?"
"qualified-symbol?" "quot" "rand" "rand-int" "rand-nth" "random-sample" "range" "ratio?"
"rational?" "rationalize" "re-find" "re-groups" "re-matcher" "re-matches" "re-pattern" "re-seq"
"read" "read+string" "read-line" "read-string" "reader-conditional" "reader-conditional?"
"realized?" "record?" "reduce" "reduce-kv" "reduced" "reduced?" "reductions" "ref"
"ref-history-count" "ref-max-history" "ref-min-history" "ref-set" "refer"
"release-pending-sends" "rem" "remove" "remove-all-methods" "remove-method" "remove-ns"
"remove-tap" "remove-watch" "repeat" "repeatedly" "replace" "replicate" "requiring-resolve"
"reset!" "reset-meta!" "reset-vals!" "resolve" "rest" "restart-agent" "resultset-seq" "reverse"
"reversible?" "rseq" "rsubseq" "run!" "satisfies?" "second" "select-keys" "send" "send-off"
"send-via" "seq" "seq?" "seqable?" "seque" "sequence" "sequential?" "set"
"set-agent-send-executor!" "set-agent-send-off-executor!" "set-error-handler!" "set-error-mode!"
"set-validator!" "set?" "short" "short-array" "shorts" "shuffle" "shutdown-agents"
"simple-ident?" "simple-keyword?" "simple-symbol?" "slurp" "some" "some-fn" "some?" "sort"
"sort-by" "sorted-map" "sorted-map-by" "sorted-set" "sorted-set-by" "sorted?" "special-symbol?"
"spit" "split-at" "split-with" "str" "string?" "struct" "struct-map" "subs" "subseq" "subvec"
"supers" "swap!" "swap-vals!" "symbol" "symbol?" "tagged-literal" "tagged-literal?" "take"
"take-last" "take-nth" "take-while" "tap>" "test" "the-ns" "thread-bound?" "to-array"
"to-array-2d" "trampoline" "transduce" "transient" "tree-seq" "true?" "type" "unchecked-add"
"unchecked-add-int" "unchecked-byte" "unchecked-char" "unchecked-dec" "unchecked-dec-int"
"unchecked-divide-int" "unchecked-double" "unchecked-float" "unchecked-inc" "unchecked-inc-int"
"unchecked-int" "unchecked-long" "unchecked-multiply" "unchecked-multiply-int"
"unchecked-negate" "unchecked-negate-int" "unchecked-remainder-int" "unchecked-short"
"unchecked-subtract" "unchecked-subtract-int" "underive" "unquote" "unquote-splicing"
"unreduced" "unsigned-bit-shift-right" "update" "update-in" "update-proxy" "uri?" "uuid?" "val"
"vals" "var-get" "var-set" "var?" "vary-meta" "vec" "vector" "vector-of" "vector?" "volatile!"
"volatile?" "vreset!" "with-bindings*" "with-meta" "with-redefs-fn" "xml-seq" "zero?" "zipmap"
; earlier
"drop" "drop-last" "drop-while" "double?" "doubles" "ex-data" "ex-info"
; 1.10
"ex-cause" "ex-message"
;; 1.11
"NaN?" "abs" "infinite?" "iteration" "random-uuid"
"parse-boolean" "parse-double" "parse-long" "parse-uuid"
"seq-to-map-for-destructuring" "update-keys" "update-vals"
;; 1.12
; 1.11
"NaN?" "abs" "infinite?" "iteration" "random-uuid" "parse-boolean" "parse-double" "parse-long"
"parse-uuid" "seq-to-map-for-destructuring" "update-keys" "update-vals"
; 1.12
"partitionv" "partitionv-all" "splitv-at"))
; >> Context based highlighting

View file

@ -102,35 +102,26 @@
(if)
(argument_list
(argument) @keyword.operator)
; format-ignore
(#any-of? @keyword.operator
"NOT" "AND" "OR"
"COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST"
"EXISTS" "IS_NEWER_THAN" "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE"
"MATCHES"
"LESS" "GREATER" "EQUAL" "LESS_EQUAL" "GREATER_EQUAL"
"STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL"
"VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL"
))
(#any-of? @keyword.operator
"NOT" "AND" "OR" "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST" "EXISTS" "IS_NEWER_THAN"
"IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE" "MATCHES" "LESS" "GREATER" "EQUAL" "LESS_EQUAL"
"GREATER_EQUAL" "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL"
"VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL"))
(elseif_command
(elseif)
(argument_list
(argument) @keyword.operator)
; format-ignore
(#any-of? @keyword.operator
"NOT" "AND" "OR"
"COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST"
"EXISTS" "IS_NEWER_THAN" "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE"
"MATCHES"
"LESS" "GREATER" "EQUAL" "LESS_EQUAL" "GREATER_EQUAL"
"STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL"
"VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL"
))
(#any-of? @keyword.operator
"NOT" "AND" "OR" "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST" "EXISTS" "IS_NEWER_THAN"
"IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE" "MATCHES" "LESS" "GREATER" "EQUAL" "LESS_EQUAL"
"GREATER_EQUAL" "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL"
"VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL"))
(normal_command
(identifier) @function.builtin
(#match? @function.builtin "\\c^(cmake_host_system_information|cmake_language|cmake_minimum_required|cmake_parse_arguments|cmake_path|cmake_policy|configure_file|execute_process|file|find_file|find_library|find_package|find_path|find_program|foreach|get_cmake_property|get_directory_property|get_filename_component|get_property|include|include_guard|list|macro|mark_as_advanced|math|message|option|separate_arguments|set|set_directory_properties|set_property|site_name|string|unset|variable_watch|add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|build_command|create_test_sourcelist|define_property|enable_language|enable_testing|export|fltk_wrap_ui|get_source_file_property|get_target_property|get_test_property|include_directories|include_external_msproject|include_regular_expression|install|link_directories|link_libraries|load_cache|project|remove_definitions|set_source_files_properties|set_target_properties|set_tests_properties|source_group|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_precompile_headers|target_sources|try_compile|try_run|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload)$"))
(#match? @function.builtin
"\\c^(cmake_host_system_information|cmake_language|cmake_minimum_required|cmake_parse_arguments|cmake_path|cmake_policy|configure_file|execute_process|file|find_file|find_library|find_package|find_path|find_program|foreach|get_cmake_property|get_directory_property|get_filename_component|get_property|include|include_guard|list|macro|mark_as_advanced|math|message|option|separate_arguments|set|set_directory_properties|set_property|site_name|string|unset|variable_watch|add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|build_command|create_test_sourcelist|define_property|enable_language|enable_testing|export|fltk_wrap_ui|get_source_file_property|get_target_property|get_test_property|include_directories|include_external_msproject|include_regular_expression|install|link_directories|link_libraries|load_cache|project|remove_definitions|set_source_files_properties|set_target_properties|set_tests_properties|source_group|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_precompile_headers|target_sources|try_compile|try_run|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload)$"))
(normal_command
(identifier) @_function
@ -179,7 +170,9 @@
(argument) @constant
.
(argument) @variable
(#any-of? @constant "APPEND" "FILTER" "INSERT" "POP_BACK" "POP_FRONT" "PREPEND" "REMOVE_ITEM" "REMOVE_AT" "REMOVE_DUPLICATES" "REVERSE" "SORT")))
(#any-of? @constant
"APPEND" "FILTER" "INSERT" "POP_BACK" "POP_FRONT" "PREPEND" "REMOVE_ITEM" "REMOVE_AT"
"REMOVE_DUPLICATES" "REVERSE" "SORT")))
(normal_command
(identifier) @_function

File diff suppressed because one or more lines are too long

View file

@ -249,7 +249,9 @@
; when used as an identifier:
((identifier) @variable.builtin
(#any-of? @variable.builtin "abstract" "as" "covariant" "deferred" "dynamic" "export" "external" "factory" "Function" "get" "implements" "import" "interface" "library" "operator" "mixin" "part" "set" "static" "typedef"))
(#any-of? @variable.builtin
"abstract" "as" "covariant" "deferred" "dynamic" "export" "external" "factory" "Function" "get"
"implements" "import" "interface" "library" "operator" "mixin" "part" "set" "static" "typedef"))
[
"if"

View file

@ -34,7 +34,12 @@
(#any-of? @variable.builtin "arguments" "module" "console" "window" "document"))
((identifier) @type.builtin
(#any-of? @type.builtin "Object" "Function" "Boolean" "Symbol" "Number" "Math" "Date" "String" "RegExp" "Map" "Set" "WeakMap" "WeakSet" "Promise" "Array" "Int8Array" "Uint8Array" "Uint8ClampedArray" "Int16Array" "Uint16Array" "Int32Array" "Uint32Array" "Float32Array" "Float64Array" "ArrayBuffer" "DataView" "Error" "EvalError" "InternalError" "RangeError" "ReferenceError" "SyntaxError" "TypeError" "URIError"))
(#any-of? @type.builtin
"Object" "Function" "Boolean" "Symbol" "Number" "Math" "Date" "String" "RegExp" "Map" "Set"
"WeakMap" "WeakSet" "Promise" "Array" "Int8Array" "Uint8Array" "Uint8ClampedArray" "Int16Array"
"Uint16Array" "Int32Array" "Uint32Array" "Float32Array" "Float64Array" "ArrayBuffer" "DataView"
"Error" "EvalError" "InternalError" "RangeError" "ReferenceError" "SyntaxError" "TypeError"
"URIError"))
(statement_identifier) @label
@ -119,7 +124,9 @@
(#eq? @module.builtin "Intl"))
((identifier) @function.builtin
(#any-of? @function.builtin "eval" "isFinite" "isNaN" "parseFloat" "parseInt" "decodeURI" "decodeURIComponent" "encodeURI" "encodeURIComponent" "require"))
(#any-of? @function.builtin
"eval" "isFinite" "isNaN" "parseFloat" "parseInt" "decodeURI" "decodeURIComponent" "encodeURI"
"encodeURIComponent" "require"))
; Constructor
;------------

View file

@ -6,7 +6,8 @@
] @punctuation.bracket
((section_name) @variable.builtin
(#match? @variable.builtin "\\c^(FileInfo|DeviceInfo|DummyUsage|MandatoryObjects|OptionalObjects)$"))
(#match? @variable.builtin
"\\c^(FileInfo|DeviceInfo|DummyUsage|MandatoryObjects|OptionalObjects)$"))
((section_name) @variable.builtin
(#lua-match? @variable.builtin "^1"))

View file

@ -109,7 +109,9 @@
(call
target:
((identifier) @keyword.function
(#any-of? @keyword.function "def" "defdelegate" "defexception" "defguard" "defguardp" "defimpl" "defmacro" "defmacrop" "defmodule" "defn" "defnp" "defoverridable" "defp" "defprotocol" "defstruct"))
(#any-of? @keyword.function
"def" "defdelegate" "defexception" "defguard" "defguardp" "defimpl" "defmacro" "defmacrop"
"defmodule" "defn" "defnp" "defoverridable" "defp" "defprotocol" "defstruct"))
(arguments
[
(call
@ -126,7 +128,9 @@
(call
target:
((identifier) @keyword
(#any-of? @keyword "alias" "case" "catch" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require" "reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with")))
(#any-of? @keyword
"alias" "case" "catch" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require"
"reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with")))
; Special Constants
((identifier) @constant.builtin

View file

@ -136,7 +136,9 @@
((variable
(identifier) @constant.builtin)
(#any-of? @constant.builtin "_" "after-chdir" "args" "before-chdir" "buildinfo" "nil" "notify-bg-job-success" "num-bg-jobs" "ok" "paths" "pid" "pwd" "value-out-indicator" "version"))
(#any-of? @constant.builtin
"_" "after-chdir" "args" "before-chdir" "buildinfo" "nil" "notify-bg-job-success" "num-bg-jobs"
"ok" "paths" "pid" "pwd" "value-out-indicator" "version"))
[
"$"

View file

@ -55,7 +55,6 @@
(#lua-match? @variable.parameter "^%$[1-9]$"))
((symbol) @operator
; format-ignore
(#any-of? @operator
; arithmetic
"+" "-" "*" "/" "//" "%" "^"
@ -65,7 +64,6 @@
"#" "." "?." ".."))
((symbol) @keyword.operator
; format-ignore
(#any-of? @keyword.operator
; comparison
"not="
@ -89,48 +87,17 @@
(#any-of? @keyword.conditional "if" "when" "match" "case"))
((symbol) @keyword
; format-ignore
(#any-of? @keyword
"global"
"local"
"let"
"set"
"var"
"comment"
"do"
"doc"
"eval-compiler"
"lua"
"macros"
"unquote"
"quote"
"tset"
"values"
"tail!"))
"global" "local" "let" "set" "var" "comment" "do" "doc" "eval-compiler" "lua" "macros" "unquote"
"quote" "tset" "values" "tail!"))
((symbol) @keyword.import
(#any-of? @keyword.import "require" "require-macros" "import-macros" "include"))
((symbol) @function.macro
; format-ignore
(#any-of? @function.macro
"collect"
"icollect"
"fcollect"
"accumulate"
"faccumulate"
"->"
"->>"
"-?>"
"-?>>"
"?."
"doto"
"macro"
"macrodebug"
"partial"
"pick-args"
"pick-values"
"with-open"))
"collect" "icollect" "fcollect" "accumulate" "faccumulate" "->" "->>" "-?>" "-?>>" "?." "doto"
"macro" "macrodebug" "partial" "pick-args" "pick-values" "with-open"))
; TODO: Highlight builtin methods (`table.unpack`, etc) as @function.builtin
([
@ -138,7 +105,8 @@
(multi_symbol
base: (symbol_fragment) @module.builtin)
]
(#any-of? @module.builtin "vim" "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8"))
(#any-of? @module.builtin
"vim" "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8"))
([
(symbol) @variable.builtin
@ -155,36 +123,10 @@
(#eq? @constant.builtin "_VERSION"))
((symbol) @function.builtin
; format-ignore
(#any-of? @function.builtin
"assert"
"collectgarbage"
"dofile"
"error"
"getmetatable"
"ipairs"
"load"
"loadfile"
"next"
"pairs"
"pcall"
"print"
"rawequal"
"rawget"
"rawlen"
"rawset"
"require"
"select"
"setmetatable"
"tonumber"
"tostring"
"type"
"warn"
"xpcall"
"module"
"setfenv"
"loadstring"
"unpack"))
"assert" "collectgarbage" "dofile" "error" "getmetatable" "ipairs" "load" "loadfile" "next"
"pairs" "pcall" "print" "rawequal" "rawget" "rawlen" "rawset" "require" "select" "setmetatable"
"tonumber" "tostring" "type" "warn" "xpcall" "module" "setfenv" "loadstring" "unpack"))
(table
(table_pair

View file

@ -5,7 +5,9 @@
((list
.
(symbol) @_call) @local.scope
(#any-of? @_call "let" "fn" "lambda" "λ" "while" "each" "for" "if" "when" "do" "collect" "icollect" "accumulate" "case" "match"))
(#any-of? @_call
"let" "fn" "lambda" "λ" "while" "each" "for" "if" "when" "do" "collect" "icollect" "accumulate"
"case" "match"))
(symbol) @local.reference

View file

@ -116,7 +116,11 @@
name:
[
(word) @function.builtin
(#any-of? @function.builtin "." ":" "_" "alias" "argparse" "bg" "bind" "block" "breakpoint" "builtin" "cd" "command" "commandline" "complete" "contains" "count" "disown" "echo" "emit" "eval" "exec" "exit" "fg" "functions" "history" "isatty" "jobs" "math" "printf" "pwd" "random" "read" "realpath" "set" "set_color" "source" "status" "string" "test" "time" "type" "ulimit" "wait")
(#any-of? @function.builtin
"." ":" "_" "alias" "argparse" "bg" "bind" "block" "breakpoint" "builtin" "cd" "command"
"commandline" "complete" "contains" "count" "disown" "echo" "emit" "eval" "exec" "exit" "fg"
"functions" "history" "isatty" "jobs" "math" "printf" "pwd" "random" "read" "realpath" "set"
"set_color" "source" "status" "string" "test" "time" "type" "ulimit" "wait")
])
; Functions

View file

@ -233,166 +233,170 @@
((annotation
"@" @attribute
(identifier) @attribute)
; format-ignore
(#any-of? @attribute
; @GDScript
"export" "export_category" "export_color_no_alpha" "export_dir"
"export_enum" "export_exp_easing" "export_file" "export_flags"
"export_flags_2d_navigation" "export_flags_2d_physics"
"export_flags_2d_render" "export_flags_3d_navigation"
"export_flags_3d_physics" "export_flags_3d_render" "export_global_dir"
"export_global_file" "export_group" "export_multiline" "export_node_path"
"export_placeholder" "export_range" "export_subgroup" "icon" "onready"
"rpc" "tool" "warning_ignore"))
"export" "export_category" "export_color_no_alpha" "export_dir" "export_enum"
"export_exp_easing" "export_file" "export_flags" "export_flags_2d_navigation"
"export_flags_2d_physics" "export_flags_2d_render" "export_flags_3d_navigation"
"export_flags_3d_physics" "export_flags_3d_render" "export_global_dir" "export_global_file"
"export_group" "export_multiline" "export_node_path" "export_placeholder" "export_range"
"export_subgroup" "icon" "onready" "rpc" "tool" "warning_ignore"))
; Builtin Types
([
(identifier)
(type)
] @type.builtin
; format-ignore
(#any-of? @type.builtin
; from godot-vscode-plugin
"Vector2" "Vector2i" "Vector3" "Vector3i"
"Color" "Rect2" "Rect2i" "Array" "Basis" "Dictionary"
"Plane" "Quat" "RID" "Rect3" "Transform" "Transform2D"
"Transform3D" "AABB" "String" "NodePath" "Object"
"PoolByteArray" "PoolIntArray" "PoolRealArray"
"PoolStringArray" "PoolVector2Array" "PoolVector3Array"
"PoolColorArray" "bool" "int" "float" "StringName" "Quaternion"
"PackedByteArray" "PackedInt32Array" "PackedInt64Array"
"PackedFloat32Array" "PackedFloat64Array" "PackedStringArray"
"PackedVector2Array" "PackedVector2iArray" "PackedVector3Array"
"PackedVector3iArray" "PackedColorArray"
; @GlobalScope
"AudioServer" "CameraServer" "ClassDB" "DisplayServer" "Engine"
"EngineDebugger" "GDExtensionManager" "Geometry2D" "Geometry3D" "GodotSharp"
"IP" "Input" "InputMap" "JavaClassWrapper" "JavaScriptBridge" "Marshalls"
"NavigationMeshGenerator" "NavigationServer2D" "NavigationServer3D" "OS"
"Performance" "PhysicsServer2D" "PhysicsServer2DManager" "PhysicsServer3D"
"PhysicsServer3DManager" "ProjectSettings" "RenderingServer" "ResourceLoader"
"ResourceSaver" "ResourceUID" "TextServerManager" "ThemeDB" "Time"
"TranslationServer" "WorkerThreadPool" "XRServer"
))
; from godot-vscode-plugin
"Vector2" "Vector2i" "Vector3" "Vector3i" "Color" "Rect2" "Rect2i" "Array" "Basis" "Dictionary"
"Plane" "Quat" "RID" "Rect3" "Transform" "Transform2D" "Transform3D" "AABB" "String" "NodePath"
"Object" "PoolByteArray" "PoolIntArray" "PoolRealArray" "PoolStringArray" "PoolVector2Array"
"PoolVector3Array" "PoolColorArray" "bool" "int" "float" "StringName" "Quaternion"
"PackedByteArray" "PackedInt32Array" "PackedInt64Array" "PackedFloat32Array"
"PackedFloat64Array" "PackedStringArray" "PackedVector2Array" "PackedVector2iArray"
"PackedVector3Array" "PackedVector3iArray" "PackedColorArray"
; @GlobalScope
"AudioServer" "CameraServer" "ClassDB" "DisplayServer" "Engine" "EngineDebugger"
"GDExtensionManager" "Geometry2D" "Geometry3D" "GodotSharp" "IP" "Input" "InputMap"
"JavaClassWrapper" "JavaScriptBridge" "Marshalls" "NavigationMeshGenerator" "NavigationServer2D"
"NavigationServer3D" "OS" "Performance" "PhysicsServer2D" "PhysicsServer2DManager"
"PhysicsServer3D" "PhysicsServer3DManager" "ProjectSettings" "RenderingServer" "ResourceLoader"
"ResourceSaver" "ResourceUID" "TextServerManager" "ThemeDB" "Time" "TranslationServer"
"WorkerThreadPool" "XRServer"))
; Builtin Funcs
; format-ignore
(call
(identifier) @function.builtin
(#any-of? @function.builtin
; @GlobalScope
"abs" "absf" "absi" "acos" "asin" "atan" "atan2" "bezier_derivative"
"bezier_interpolate" "bytes_to_var" "bytes_to_var_with_objects" "ceil" "ceilf"
"ceili" "clamp" "clampf" "clampi" "cos" "cosh" "cubic_interpolate"
"cubic_interpolate_angle" "cubic_interpolate_angle_in_time"
"cubic_interpolate_in_time" "db_to_linear" "deg_to_rad" "ease" "error_string"
"exp" "floor" "floorf" "floori" "fmod" "fposmod" "hash" "instance_from_id"
"inverse_lerp" "is_equal_approx" "is_finite" "is_inf" "is_instance_id_valid"
"is_instance_valid" "is_nan" "is_same" "is_zero_approx" "lerp" "lerp_angle"
"lerpf" "linear_to_db" "log" "max" "maxf" "maxi" "min" "minf" "mini"
"move_toward" "nearest_po2" "pingpong" "posmod" "pow" "print" "print_rich"
"print_verbose" "printerr" "printraw" "prints" "printt" "push_error"
"push_warning" "rad_to_deg" "rand_from_seed" "randf" "randf_range" "randfn"
"randi" "randi_range" "randomize" "remap" "rid_allocate_id" "rid_from_int64"
"round" "roundf" "roundi" "seed" "sign" "signf" "signi" "sin" "sinh"
"smoothstep" "snapped" "snappedf" "snappedi" "sqrt" "step_decimals" "str"
"str_to_var" "tan" "tanh" "typeof" "var_to_bytes" "var_to_bytes_with_objects"
"var_to_str" "weakref" "wrap" "wrapf" "wrapi"
"abs" "absf" "absi" "acos" "asin" "atan" "atan2" "bezier_derivative" "bezier_interpolate"
"bytes_to_var" "bytes_to_var_with_objects" "ceil" "ceilf" "ceili" "clamp" "clampf" "clampi"
"cos" "cosh" "cubic_interpolate" "cubic_interpolate_angle" "cubic_interpolate_angle_in_time"
"cubic_interpolate_in_time" "db_to_linear" "deg_to_rad" "ease" "error_string" "exp" "floor"
"floorf" "floori" "fmod" "fposmod" "hash" "instance_from_id" "inverse_lerp" "is_equal_approx"
"is_finite" "is_inf" "is_instance_id_valid" "is_instance_valid" "is_nan" "is_same"
"is_zero_approx" "lerp" "lerp_angle" "lerpf" "linear_to_db" "log" "max" "maxf" "maxi" "min"
"minf" "mini" "move_toward" "nearest_po2" "pingpong" "posmod" "pow" "print" "print_rich"
"print_verbose" "printerr" "printraw" "prints" "printt" "push_error" "push_warning" "rad_to_deg"
"rand_from_seed" "randf" "randf_range" "randfn" "randi" "randi_range" "randomize" "remap"
"rid_allocate_id" "rid_from_int64" "round" "roundf" "roundi" "seed" "sign" "signf" "signi" "sin"
"sinh" "smoothstep" "snapped" "snappedf" "snappedi" "sqrt" "step_decimals" "str" "str_to_var"
"tan" "tanh" "typeof" "var_to_bytes" "var_to_bytes_with_objects" "var_to_str" "weakref" "wrap"
"wrapf" "wrapi"
; @GDScript
"Color8" "assert" "char" "convert" "dict_to_inst" "get_stack" "inst_to_dict"
"is_instance_of" "len" "print_debug" "print_stack" "range"
"type_exists"))
"Color8" "assert" "char" "convert" "dict_to_inst" "get_stack" "inst_to_dict" "is_instance_of"
"len" "print_debug" "print_stack" "range" "type_exists"))
; Builtin Constants
((identifier) @constant.builtin
; format-ignore
(#any-of? @constant.builtin
; @GDScript
"PI" "TAU" "INF" "NAN"
; @GlobalScope
"SIDE_LEFT" "SIDE_TOP" "SIDE_RIGHT" "SIDE_BOTTOM" "CORNER_TOP_LEFT" "CORNER_TOP_RIGHT" "CORNER_BOTTOM_RIGHT"
"CORNER_BOTTOM_LEFT" "VERTICAL" "HORIZONTAL" "CLOCKWISE" "COUNTERCLOCKWISE" "HORIZONTAL_ALIGNMENT_LEFT"
"HORIZONTAL_ALIGNMENT_CENTER" "HORIZONTAL_ALIGNMENT_RIGHT" "HORIZONTAL_ALIGNMENT_FILL" "VERTICAL_ALIGNMENT_TOP"
"VERTICAL_ALIGNMENT_CENTER" "VERTICAL_ALIGNMENT_BOTTOM" "VERTICAL_ALIGNMENT_FILL" "INLINE_ALIGNMENT_TOP_TO"
"INLINE_ALIGNMENT_CENTER_TO" "INLINE_ALIGNMENT_BASELINE_TO" "INLINE_ALIGNMENT_BOTTOM_TO" "INLINE_ALIGNMENT_TO_TOP"
"INLINE_ALIGNMENT_TO_CENTER" "INLINE_ALIGNMENT_TO_BASELINE" "INLINE_ALIGNMENT_TO_BOTTOM" "INLINE_ALIGNMENT_TOP"
"INLINE_ALIGNMENT_CENTER" "INLINE_ALIGNMENT_BOTTOM" "INLINE_ALIGNMENT_IMAGE_MASK" "INLINE_ALIGNMENT_TEXT_MASK"
"EULER_ORDER_XYZ" "EULER_ORDER_XZY" "EULER_ORDER_YXZ" "EULER_ORDER_YZX" "EULER_ORDER_ZXY" "EULER_ORDER_ZYX" "KEY_NONE"
"KEY_SPECIAL" "KEY_ESCAPE" "KEY_TAB" "KEY_BACKTAB" "KEY_BACKSPACE" "KEY_ENTER" "KEY_KP_ENTER" "KEY_INSERT" "KEY_DELETE"
"KEY_PAUSE" "KEY_PRINT" "KEY_SYSREQ" "KEY_CLEAR" "KEY_HOME" "KEY_END" "KEY_LEFT" "KEY_UP" "KEY_RIGHT" "KEY_DOWN"
"KEY_PAGEUP" "KEY_PAGEDOWN" "KEY_SHIFT" "KEY_CTRL" "KEY_META" "KEY_ALT" "KEY_CAPSLOCK" "KEY_NUMLOCK" "KEY_SCROLLLOCK"
"KEY_F1" "KEY_F2" "KEY_F3" "KEY_F4" "KEY_F5" "KEY_F6" "KEY_F7" "KEY_F8" "KEY_F9" "KEY_F10" "KEY_F11" "KEY_F12"
"KEY_F13" "KEY_F14" "KEY_F15" "KEY_F16" "KEY_F17" "KEY_F18" "KEY_F19" "KEY_F20" "KEY_F21" "KEY_F22" "KEY_F23" "KEY_F24"
"KEY_F25" "KEY_F26" "KEY_F27" "KEY_F28" "KEY_F29" "KEY_F30" "KEY_F31" "KEY_F32" "KEY_F33" "KEY_F34" "KEY_F35"
"KEY_KP_MULTIPLY" "KEY_KP_DIVIDE" "KEY_KP_SUBTRACT" "KEY_KP_PERIOD" "KEY_KP_ADD" "KEY_KP_0" "KEY_KP_1" "KEY_KP_2"
"KEY_KP_3" "KEY_KP_4" "KEY_KP_5" "KEY_KP_6" "KEY_KP_7" "KEY_KP_8" "KEY_KP_9" "KEY_MENU" "KEY_HYPER" "KEY_HELP"
"KEY_BACK" "KEY_FORWARD" "KEY_STOP" "KEY_REFRESH" "KEY_VOLUMEDOWN" "KEY_VOLUMEMUTE" "KEY_VOLUMEUP" "KEY_MEDIAPLAY"
"KEY_MEDIASTOP" "KEY_MEDIAPREVIOUS" "KEY_MEDIANEXT" "KEY_MEDIARECORD" "KEY_HOMEPAGE" "KEY_FAVORITES" "KEY_SEARCH"
"KEY_STANDBY" "KEY_OPENURL" "KEY_LAUNCHMAIL" "KEY_LAUNCHMEDIA" "KEY_LAUNCH0" "KEY_LAUNCH1" "KEY_LAUNCH2" "KEY_LAUNCH3"
"KEY_LAUNCH4" "KEY_LAUNCH5" "KEY_LAUNCH6" "KEY_LAUNCH7" "KEY_LAUNCH8" "KEY_LAUNCH9" "KEY_LAUNCHA" "KEY_LAUNCHB"
"KEY_LAUNCHC" "KEY_LAUNCHD" "KEY_LAUNCHE" "KEY_LAUNCHF" "KEY_UNKNOWN" "KEY_SPACE" "KEY_EXCLAM" "KEY_QUOTEDBL"
"KEY_NUMBERSIGN" "KEY_DOLLAR" "KEY_PERCENT" "KEY_AMPERSAND" "KEY_APOSTROPHE" "KEY_PARENLEFT" "KEY_PARENRIGHT"
"KEY_ASTERISK" "KEY_PLUS" "KEY_COMMA" "KEY_MINUS" "KEY_PERIOD" "KEY_SLASH" "KEY_0" "KEY_1" "KEY_2" "KEY_3" "KEY_4"
"KEY_5" "KEY_6" "KEY_7" "KEY_8" "KEY_9" "KEY_COLON" "KEY_SEMICOLON" "KEY_LESS" "KEY_EQUAL" "KEY_GREATER" "KEY_QUESTION"
"KEY_AT" "KEY_A" "KEY_B" "KEY_C" "KEY_D" "KEY_E" "KEY_F" "KEY_G" "KEY_H" "KEY_I" "KEY_J" "KEY_K" "KEY_L" "KEY_M"
"KEY_N" "KEY_O" "KEY_P" "KEY_Q" "KEY_R" "KEY_S" "KEY_T" "KEY_U" "KEY_V" "KEY_W" "KEY_X" "KEY_Y" "KEY_Z"
"KEY_BRACKETLEFT" "KEY_BACKSLASH" "KEY_BRACKETRIGHT" "KEY_ASCIICIRCUM" "KEY_UNDERSCORE" "KEY_QUOTELEFT" "KEY_BRACELEFT"
"KEY_BAR" "KEY_BRACERIGHT" "KEY_ASCIITILDE" "KEY_YEN" "KEY_SECTION" "KEY_GLOBE" "KEY_KEYBOARD" "KEY_JIS_EISU"
"KEY_JIS_KANA" "KEY_CODE_MASK" "KEY_MODIFIER_MASK" "KEY_MASK_CMD_OR_CTRL" "KEY_MASK_SHIFT" "KEY_MASK_ALT"
"KEY_MASK_META" "KEY_MASK_CTRL" "KEY_MASK_KPAD" "KEY_MASK_GROUP_SWITCH" "MOUSE_BUTTON_NONE" "MOUSE_BUTTON_LEFT"
"MOUSE_BUTTON_RIGHT" "MOUSE_BUTTON_MIDDLE" "MOUSE_BUTTON_WHEEL_UP" "MOUSE_BUTTON_WHEEL_DOWN" "MOUSE_BUTTON_WHEEL_LEFT"
"MOUSE_BUTTON_WHEEL_RIGHT" "MOUSE_BUTTON_XBUTTON1" "MOUSE_BUTTON_XBUTTON2" "MOUSE_BUTTON_MASK_LEFT"
"MOUSE_BUTTON_MASK_RIGHT" "MOUSE_BUTTON_MASK_MIDDLE" "MOUSE_BUTTON_MASK_MB_XBUTTON1" "MOUSE_BUTTON_MASK_MB_XBUTTON2"
"JOY_BUTTON_INVALID" "JOY_BUTTON_A" "JOY_BUTTON_B" "JOY_BUTTON_X" "JOY_BUTTON_Y" "JOY_BUTTON_BACK" "JOY_BUTTON_GUIDE"
"JOY_BUTTON_START" "JOY_BUTTON_LEFT_STICK" "JOY_BUTTON_RIGHT_STICK" "JOY_BUTTON_LEFT_SHOULDER"
"JOY_BUTTON_RIGHT_SHOULDER" "JOY_BUTTON_DPAD_UP" "JOY_BUTTON_DPAD_DOWN" "JOY_BUTTON_DPAD_LEFT" "JOY_BUTTON_DPAD_RIGHT"
"JOY_BUTTON_MISC1" "JOY_BUTTON_PADDLE1" "JOY_BUTTON_PADDLE2" "JOY_BUTTON_PADDLE3" "JOY_BUTTON_PADDLE4"
"JOY_BUTTON_TOUCHPAD" "JOY_BUTTON_SDL_MAX" "JOY_BUTTON_MAX" "JOY_AXIS_INVALID" "JOY_AXIS_LEFT_X" "JOY_AXIS_LEFT_Y"
"JOY_AXIS_RIGHT_X" "JOY_AXIS_RIGHT_Y" "JOY_AXIS_TRIGGER_LEFT" "JOY_AXIS_TRIGGER_RIGHT" "JOY_AXIS_SDL_MAX"
"JOY_AXIS_MAX" "MIDI_MESSAGE_NONE" "MIDI_MESSAGE_NOTE_OFF" "MIDI_MESSAGE_NOTE_ON" "MIDI_MESSAGE_AFTERTOUCH"
"MIDI_MESSAGE_CONTROL_CHANGE" "MIDI_MESSAGE_PROGRAM_CHANGE" "MIDI_MESSAGE_CHANNEL_PRESSURE" "MIDI_MESSAGE_PITCH_BEND"
"MIDI_MESSAGE_SYSTEM_EXCLUSIVE" "MIDI_MESSAGE_QUARTER_FRAME" "MIDI_MESSAGE_SONG_POSITION_POINTER"
"MIDI_MESSAGE_SONG_SELECT" "MIDI_MESSAGE_TUNE_REQUEST" "MIDI_MESSAGE_TIMING_CLOCK" "MIDI_MESSAGE_START"
"MIDI_MESSAGE_CONTINUE" "MIDI_MESSAGE_STOP" "MIDI_MESSAGE_ACTIVE_SENSING" "MIDI_MESSAGE_SYSTEM_RESET" "OK" "FAILED"
"ERR_UNAVAILABLE" "ERR_UNCONFIGURED" "ERR_UNAUTHORIZED" "ERR_PARAMETER_RANGE_ERROR" "ERR_OUT_OF_MEMORY"
"ERR_FILE_NOT_FOUND" "ERR_FILE_BAD_DRIVE" "ERR_FILE_BAD_PATH" "ERR_FILE_NO_PERMISSION" "ERR_FILE_ALREADY_IN_USE"
"ERR_FILE_CANT_OPEN" "ERR_FILE_CANT_WRITE" "ERR_FILE_CANT_READ" "ERR_FILE_UNRECOGNIZED" "ERR_FILE_CORRUPT"
"ERR_FILE_MISSING_DEPENDENCIES" "ERR_FILE_EOF" "ERR_CANT_OPEN" "ERR_CANT_CREATE" "ERR_QUERY_FAILED"
"ERR_ALREADY_IN_USE" "ERR_LOCKED" "ERR_TIMEOUT" "ERR_CANT_CONNECT" "ERR_CANT_RESOLVE" "ERR_CONNECTION_ERROR"
"ERR_CANT_ACQUIRE_RESOURCE" "ERR_CANT_FORK" "ERR_INVALID_DATA" "ERR_INVALID_PARAMETER" "ERR_ALREADY_EXISTS"
"ERR_DOES_NOT_EXIST" "ERR_DATABASE_CANT_READ" "ERR_DATABASE_CANT_WRITE" "ERR_COMPILATION_FAILED" "ERR_METHOD_NOT_FOUND"
"ERR_LINK_FAILED" "ERR_SCRIPT_FAILED" "ERR_CYCLIC_LINK" "ERR_INVALID_DECLARATION" "ERR_DUPLICATE_SYMBOL"
"ERR_PARSE_ERROR" "ERR_BUSY" "ERR_SKIP" "ERR_HELP" "ERR_BUG" "ERR_PRINTER_ON_FIRE" "PROPERTY_HINT_NONE"
"PROPERTY_HINT_RANGE" "PROPERTY_HINT_ENUM" "PROPERTY_HINT_ENUM_SUGGESTION" "PROPERTY_HINT_EXP_EASING"
"PROPERTY_HINT_LINK" "PROPERTY_HINT_FLAGS" "PROPERTY_HINT_LAYERS_2D_RENDER" "PROPERTY_HINT_LAYERS_2D_PHYSICS"
"PROPERTY_HINT_LAYERS_2D_NAVIGATION" "PROPERTY_HINT_LAYERS_3D_RENDER" "PROPERTY_HINT_LAYERS_3D_PHYSICS"
"PROPERTY_HINT_LAYERS_3D_NAVIGATION" "PROPERTY_HINT_FILE" "PROPERTY_HINT_DIR" "PROPERTY_HINT_GLOBAL_FILE"
"PROPERTY_HINT_GLOBAL_DIR" "PROPERTY_HINT_RESOURCE_TYPE" "PROPERTY_HINT_MULTILINE_TEXT" "PROPERTY_HINT_EXPRESSION"
"PROPERTY_HINT_PLACEHOLDER_TEXT" "PROPERTY_HINT_COLOR_NO_ALPHA" "PROPERTY_HINT_OBJECT_ID" "PROPERTY_HINT_TYPE_STRING"
"PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" "PROPERTY_HINT_OBJECT_TOO_BIG" "PROPERTY_HINT_NODE_PATH_VALID_TYPES"
"PROPERTY_HINT_SAVE_FILE" "PROPERTY_HINT_GLOBAL_SAVE_FILE" "PROPERTY_HINT_INT_IS_OBJECTID"
"PROPERTY_HINT_INT_IS_POINTER" "PROPERTY_HINT_ARRAY_TYPE" "PROPERTY_HINT_LOCALE_ID" "PROPERTY_HINT_LOCALIZABLE_STRING"
"PROPERTY_HINT_NODE_TYPE" "PROPERTY_HINT_HIDE_QUATERNION_EDIT" "PROPERTY_HINT_PASSWORD" "PROPERTY_HINT_MAX"
"SIDE_LEFT" "SIDE_TOP" "SIDE_RIGHT" "SIDE_BOTTOM" "CORNER_TOP_LEFT" "CORNER_TOP_RIGHT"
"CORNER_BOTTOM_RIGHT" "CORNER_BOTTOM_LEFT" "VERTICAL" "HORIZONTAL" "CLOCKWISE"
"COUNTERCLOCKWISE" "HORIZONTAL_ALIGNMENT_LEFT" "HORIZONTAL_ALIGNMENT_CENTER"
"HORIZONTAL_ALIGNMENT_RIGHT" "HORIZONTAL_ALIGNMENT_FILL" "VERTICAL_ALIGNMENT_TOP"
"VERTICAL_ALIGNMENT_CENTER" "VERTICAL_ALIGNMENT_BOTTOM" "VERTICAL_ALIGNMENT_FILL"
"INLINE_ALIGNMENT_TOP_TO" "INLINE_ALIGNMENT_CENTER_TO" "INLINE_ALIGNMENT_BASELINE_TO"
"INLINE_ALIGNMENT_BOTTOM_TO" "INLINE_ALIGNMENT_TO_TOP" "INLINE_ALIGNMENT_TO_CENTER"
"INLINE_ALIGNMENT_TO_BASELINE" "INLINE_ALIGNMENT_TO_BOTTOM" "INLINE_ALIGNMENT_TOP"
"INLINE_ALIGNMENT_CENTER" "INLINE_ALIGNMENT_BOTTOM" "INLINE_ALIGNMENT_IMAGE_MASK"
"INLINE_ALIGNMENT_TEXT_MASK" "EULER_ORDER_XYZ" "EULER_ORDER_XZY" "EULER_ORDER_YXZ"
"EULER_ORDER_YZX" "EULER_ORDER_ZXY" "EULER_ORDER_ZYX" "KEY_NONE" "KEY_SPECIAL" "KEY_ESCAPE"
"KEY_TAB" "KEY_BACKTAB" "KEY_BACKSPACE" "KEY_ENTER" "KEY_KP_ENTER" "KEY_INSERT" "KEY_DELETE"
"KEY_PAUSE" "KEY_PRINT" "KEY_SYSREQ" "KEY_CLEAR" "KEY_HOME" "KEY_END" "KEY_LEFT" "KEY_UP"
"KEY_RIGHT" "KEY_DOWN" "KEY_PAGEUP" "KEY_PAGEDOWN" "KEY_SHIFT" "KEY_CTRL" "KEY_META" "KEY_ALT"
"KEY_CAPSLOCK" "KEY_NUMLOCK" "KEY_SCROLLLOCK" "KEY_F1" "KEY_F2" "KEY_F3" "KEY_F4" "KEY_F5"
"KEY_F6" "KEY_F7" "KEY_F8" "KEY_F9" "KEY_F10" "KEY_F11" "KEY_F12" "KEY_F13" "KEY_F14" "KEY_F15"
"KEY_F16" "KEY_F17" "KEY_F18" "KEY_F19" "KEY_F20" "KEY_F21" "KEY_F22" "KEY_F23" "KEY_F24"
"KEY_F25" "KEY_F26" "KEY_F27" "KEY_F28" "KEY_F29" "KEY_F30" "KEY_F31" "KEY_F32" "KEY_F33"
"KEY_F34" "KEY_F35" "KEY_KP_MULTIPLY" "KEY_KP_DIVIDE" "KEY_KP_SUBTRACT" "KEY_KP_PERIOD"
"KEY_KP_ADD" "KEY_KP_0" "KEY_KP_1" "KEY_KP_2" "KEY_KP_3" "KEY_KP_4" "KEY_KP_5" "KEY_KP_6"
"KEY_KP_7" "KEY_KP_8" "KEY_KP_9" "KEY_MENU" "KEY_HYPER" "KEY_HELP" "KEY_BACK" "KEY_FORWARD"
"KEY_STOP" "KEY_REFRESH" "KEY_VOLUMEDOWN" "KEY_VOLUMEMUTE" "KEY_VOLUMEUP" "KEY_MEDIAPLAY"
"KEY_MEDIASTOP" "KEY_MEDIAPREVIOUS" "KEY_MEDIANEXT" "KEY_MEDIARECORD" "KEY_HOMEPAGE"
"KEY_FAVORITES" "KEY_SEARCH" "KEY_STANDBY" "KEY_OPENURL" "KEY_LAUNCHMAIL" "KEY_LAUNCHMEDIA"
"KEY_LAUNCH0" "KEY_LAUNCH1" "KEY_LAUNCH2" "KEY_LAUNCH3" "KEY_LAUNCH4" "KEY_LAUNCH5"
"KEY_LAUNCH6" "KEY_LAUNCH7" "KEY_LAUNCH8" "KEY_LAUNCH9" "KEY_LAUNCHA" "KEY_LAUNCHB"
"KEY_LAUNCHC" "KEY_LAUNCHD" "KEY_LAUNCHE" "KEY_LAUNCHF" "KEY_UNKNOWN" "KEY_SPACE" "KEY_EXCLAM"
"KEY_QUOTEDBL" "KEY_NUMBERSIGN" "KEY_DOLLAR" "KEY_PERCENT" "KEY_AMPERSAND" "KEY_APOSTROPHE"
"KEY_PARENLEFT" "KEY_PARENRIGHT" "KEY_ASTERISK" "KEY_PLUS" "KEY_COMMA" "KEY_MINUS" "KEY_PERIOD"
"KEY_SLASH" "KEY_0" "KEY_1" "KEY_2" "KEY_3" "KEY_4" "KEY_5" "KEY_6" "KEY_7" "KEY_8" "KEY_9"
"KEY_COLON" "KEY_SEMICOLON" "KEY_LESS" "KEY_EQUAL" "KEY_GREATER" "KEY_QUESTION" "KEY_AT" "KEY_A"
"KEY_B" "KEY_C" "KEY_D" "KEY_E" "KEY_F" "KEY_G" "KEY_H" "KEY_I" "KEY_J" "KEY_K" "KEY_L" "KEY_M"
"KEY_N" "KEY_O" "KEY_P" "KEY_Q" "KEY_R" "KEY_S" "KEY_T" "KEY_U" "KEY_V" "KEY_W" "KEY_X" "KEY_Y"
"KEY_Z" "KEY_BRACKETLEFT" "KEY_BACKSLASH" "KEY_BRACKETRIGHT" "KEY_ASCIICIRCUM" "KEY_UNDERSCORE"
"KEY_QUOTELEFT" "KEY_BRACELEFT" "KEY_BAR" "KEY_BRACERIGHT" "KEY_ASCIITILDE" "KEY_YEN"
"KEY_SECTION" "KEY_GLOBE" "KEY_KEYBOARD" "KEY_JIS_EISU" "KEY_JIS_KANA" "KEY_CODE_MASK"
"KEY_MODIFIER_MASK" "KEY_MASK_CMD_OR_CTRL" "KEY_MASK_SHIFT" "KEY_MASK_ALT" "KEY_MASK_META"
"KEY_MASK_CTRL" "KEY_MASK_KPAD" "KEY_MASK_GROUP_SWITCH" "MOUSE_BUTTON_NONE" "MOUSE_BUTTON_LEFT"
"MOUSE_BUTTON_RIGHT" "MOUSE_BUTTON_MIDDLE" "MOUSE_BUTTON_WHEEL_UP" "MOUSE_BUTTON_WHEEL_DOWN"
"MOUSE_BUTTON_WHEEL_LEFT" "MOUSE_BUTTON_WHEEL_RIGHT" "MOUSE_BUTTON_XBUTTON1"
"MOUSE_BUTTON_XBUTTON2" "MOUSE_BUTTON_MASK_LEFT" "MOUSE_BUTTON_MASK_RIGHT"
"MOUSE_BUTTON_MASK_MIDDLE" "MOUSE_BUTTON_MASK_MB_XBUTTON1" "MOUSE_BUTTON_MASK_MB_XBUTTON2"
"JOY_BUTTON_INVALID" "JOY_BUTTON_A" "JOY_BUTTON_B" "JOY_BUTTON_X" "JOY_BUTTON_Y"
"JOY_BUTTON_BACK" "JOY_BUTTON_GUIDE" "JOY_BUTTON_START" "JOY_BUTTON_LEFT_STICK"
"JOY_BUTTON_RIGHT_STICK" "JOY_BUTTON_LEFT_SHOULDER" "JOY_BUTTON_RIGHT_SHOULDER"
"JOY_BUTTON_DPAD_UP" "JOY_BUTTON_DPAD_DOWN" "JOY_BUTTON_DPAD_LEFT" "JOY_BUTTON_DPAD_RIGHT"
"JOY_BUTTON_MISC1" "JOY_BUTTON_PADDLE1" "JOY_BUTTON_PADDLE2" "JOY_BUTTON_PADDLE3"
"JOY_BUTTON_PADDLE4" "JOY_BUTTON_TOUCHPAD" "JOY_BUTTON_SDL_MAX" "JOY_BUTTON_MAX"
"JOY_AXIS_INVALID" "JOY_AXIS_LEFT_X" "JOY_AXIS_LEFT_Y" "JOY_AXIS_RIGHT_X" "JOY_AXIS_RIGHT_Y"
"JOY_AXIS_TRIGGER_LEFT" "JOY_AXIS_TRIGGER_RIGHT" "JOY_AXIS_SDL_MAX" "JOY_AXIS_MAX"
"MIDI_MESSAGE_NONE" "MIDI_MESSAGE_NOTE_OFF" "MIDI_MESSAGE_NOTE_ON" "MIDI_MESSAGE_AFTERTOUCH"
"MIDI_MESSAGE_CONTROL_CHANGE" "MIDI_MESSAGE_PROGRAM_CHANGE" "MIDI_MESSAGE_CHANNEL_PRESSURE"
"MIDI_MESSAGE_PITCH_BEND" "MIDI_MESSAGE_SYSTEM_EXCLUSIVE" "MIDI_MESSAGE_QUARTER_FRAME"
"MIDI_MESSAGE_SONG_POSITION_POINTER" "MIDI_MESSAGE_SONG_SELECT" "MIDI_MESSAGE_TUNE_REQUEST"
"MIDI_MESSAGE_TIMING_CLOCK" "MIDI_MESSAGE_START" "MIDI_MESSAGE_CONTINUE" "MIDI_MESSAGE_STOP"
"MIDI_MESSAGE_ACTIVE_SENSING" "MIDI_MESSAGE_SYSTEM_RESET" "OK" "FAILED" "ERR_UNAVAILABLE"
"ERR_UNCONFIGURED" "ERR_UNAUTHORIZED" "ERR_PARAMETER_RANGE_ERROR" "ERR_OUT_OF_MEMORY"
"ERR_FILE_NOT_FOUND" "ERR_FILE_BAD_DRIVE" "ERR_FILE_BAD_PATH" "ERR_FILE_NO_PERMISSION"
"ERR_FILE_ALREADY_IN_USE" "ERR_FILE_CANT_OPEN" "ERR_FILE_CANT_WRITE" "ERR_FILE_CANT_READ"
"ERR_FILE_UNRECOGNIZED" "ERR_FILE_CORRUPT" "ERR_FILE_MISSING_DEPENDENCIES" "ERR_FILE_EOF"
"ERR_CANT_OPEN" "ERR_CANT_CREATE" "ERR_QUERY_FAILED" "ERR_ALREADY_IN_USE" "ERR_LOCKED"
"ERR_TIMEOUT" "ERR_CANT_CONNECT" "ERR_CANT_RESOLVE" "ERR_CONNECTION_ERROR"
"ERR_CANT_ACQUIRE_RESOURCE" "ERR_CANT_FORK" "ERR_INVALID_DATA" "ERR_INVALID_PARAMETER"
"ERR_ALREADY_EXISTS" "ERR_DOES_NOT_EXIST" "ERR_DATABASE_CANT_READ" "ERR_DATABASE_CANT_WRITE"
"ERR_COMPILATION_FAILED" "ERR_METHOD_NOT_FOUND" "ERR_LINK_FAILED" "ERR_SCRIPT_FAILED"
"ERR_CYCLIC_LINK" "ERR_INVALID_DECLARATION" "ERR_DUPLICATE_SYMBOL" "ERR_PARSE_ERROR" "ERR_BUSY"
"ERR_SKIP" "ERR_HELP" "ERR_BUG" "ERR_PRINTER_ON_FIRE" "PROPERTY_HINT_NONE" "PROPERTY_HINT_RANGE"
"PROPERTY_HINT_ENUM" "PROPERTY_HINT_ENUM_SUGGESTION" "PROPERTY_HINT_EXP_EASING"
"PROPERTY_HINT_LINK" "PROPERTY_HINT_FLAGS" "PROPERTY_HINT_LAYERS_2D_RENDER"
"PROPERTY_HINT_LAYERS_2D_PHYSICS" "PROPERTY_HINT_LAYERS_2D_NAVIGATION"
"PROPERTY_HINT_LAYERS_3D_RENDER" "PROPERTY_HINT_LAYERS_3D_PHYSICS"
"PROPERTY_HINT_LAYERS_3D_NAVIGATION" "PROPERTY_HINT_FILE" "PROPERTY_HINT_DIR"
"PROPERTY_HINT_GLOBAL_FILE" "PROPERTY_HINT_GLOBAL_DIR" "PROPERTY_HINT_RESOURCE_TYPE"
"PROPERTY_HINT_MULTILINE_TEXT" "PROPERTY_HINT_EXPRESSION" "PROPERTY_HINT_PLACEHOLDER_TEXT"
"PROPERTY_HINT_COLOR_NO_ALPHA" "PROPERTY_HINT_OBJECT_ID" "PROPERTY_HINT_TYPE_STRING"
"PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" "PROPERTY_HINT_OBJECT_TOO_BIG"
"PROPERTY_HINT_NODE_PATH_VALID_TYPES" "PROPERTY_HINT_SAVE_FILE" "PROPERTY_HINT_GLOBAL_SAVE_FILE"
"PROPERTY_HINT_INT_IS_OBJECTID" "PROPERTY_HINT_INT_IS_POINTER" "PROPERTY_HINT_ARRAY_TYPE"
"PROPERTY_HINT_LOCALE_ID" "PROPERTY_HINT_LOCALIZABLE_STRING" "PROPERTY_HINT_NODE_TYPE"
"PROPERTY_HINT_HIDE_QUATERNION_EDIT" "PROPERTY_HINT_PASSWORD" "PROPERTY_HINT_MAX"
"PROPERTY_USAGE_NONE" "PROPERTY_USAGE_STORAGE" "PROPERTY_USAGE_EDITOR" "PROPERTY_USAGE_INTERNAL"
"PROPERTY_USAGE_CHECKABLE" "PROPERTY_USAGE_CHECKED" "PROPERTY_USAGE_GROUP" "PROPERTY_USAGE_CATEGORY"
"PROPERTY_USAGE_SUBGROUP" "PROPERTY_USAGE_CLASS_IS_BITFIELD" "PROPERTY_USAGE_NO_INSTANCE_STATE"
"PROPERTY_USAGE_RESTART_IF_CHANGED" "PROPERTY_USAGE_SCRIPT_VARIABLE" "PROPERTY_USAGE_STORE_IF_NULL"
"PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" "PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" "PROPERTY_USAGE_CLASS_IS_ENUM"
"PROPERTY_USAGE_NIL_IS_VARIANT" "PROPERTY_USAGE_ARRAY" "PROPERTY_USAGE_ALWAYS_DUPLICATE"
"PROPERTY_USAGE_NEVER_DUPLICATE" "PROPERTY_USAGE_HIGH_END_GFX" "PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT"
"PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" "PROPERTY_USAGE_KEYING_INCREMENTS" "PROPERTY_USAGE_DEFERRED_SET_RESOURCE"
"PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" "PROPERTY_USAGE_EDITOR_BASIC_SETTING" "PROPERTY_USAGE_READ_ONLY"
"PROPERTY_USAGE_DEFAULT" "PROPERTY_USAGE_NO_EDITOR" "METHOD_FLAG_NORMAL" "METHOD_FLAG_EDITOR" "METHOD_FLAG_CONST"
"METHOD_FLAG_VIRTUAL" "METHOD_FLAG_VARARG" "METHOD_FLAG_STATIC" "METHOD_FLAG_OBJECT_CORE" "METHOD_FLAGS_DEFAULT"
"TYPE_NIL" "TYPE_BOOL" "TYPE_INT" "TYPE_FLOAT" "TYPE_STRING" "TYPE_VECTOR2" "TYPE_VECTOR2I" "TYPE_RECT2" "TYPE_RECT2I"
"TYPE_VECTOR3" "TYPE_VECTOR3I" "TYPE_TRANSFORM2D" "TYPE_VECTOR4" "TYPE_VECTOR4I" "TYPE_PLANE" "TYPE_QUATERNION"
"TYPE_AABB" "TYPE_BASIS" "TYPE_TRANSFORM3D" "TYPE_PROJECTION" "TYPE_COLOR" "TYPE_STRING_NAME" "TYPE_NODE_PATH"
"TYPE_RID" "TYPE_OBJECT" "TYPE_CALLABLE" "TYPE_SIGNAL" "TYPE_DICTIONARY" "TYPE_ARRAY" "TYPE_PACKED_BYTE_ARRAY"
"TYPE_PACKED_INT32_ARRAY" "TYPE_PACKED_INT64_ARRAY" "TYPE_PACKED_FLOAT32_ARRAY" "TYPE_PACKED_FLOAT64_ARRAY"
"TYPE_PACKED_STRING_ARRAY" "TYPE_PACKED_VECTOR2_ARRAY" "TYPE_PACKED_VECTOR3_ARRAY" "TYPE_PACKED_COLOR_ARRAY" "TYPE_MAX"
"OP_EQUAL" "OP_NOT_EQUAL" "OP_LESS" "OP_LESS_EQUAL" "OP_GREATER" "OP_GREATER_EQUAL" "OP_ADD" "OP_SUBTRACT"
"OP_MULTIPLY" "OP_DIVIDE" "OP_NEGATE" "OP_POSITIVE" "OP_MODULE" "OP_POWER" "OP_SHIFT_LEFT" "OP_SHIFT_RIGHT"
"OP_BIT_AND" "OP_BIT_OR" "OP_BIT_XOR" "OP_BIT_NEGATE" "OP_AND" "OP_OR" "OP_XOR" "OP_NOT" "OP_IN" "OP_MAX"))
"PROPERTY_USAGE_CHECKABLE" "PROPERTY_USAGE_CHECKED" "PROPERTY_USAGE_GROUP"
"PROPERTY_USAGE_CATEGORY" "PROPERTY_USAGE_SUBGROUP" "PROPERTY_USAGE_CLASS_IS_BITFIELD"
"PROPERTY_USAGE_NO_INSTANCE_STATE" "PROPERTY_USAGE_RESTART_IF_CHANGED"
"PROPERTY_USAGE_SCRIPT_VARIABLE" "PROPERTY_USAGE_STORE_IF_NULL"
"PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" "PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE"
"PROPERTY_USAGE_CLASS_IS_ENUM" "PROPERTY_USAGE_NIL_IS_VARIANT" "PROPERTY_USAGE_ARRAY"
"PROPERTY_USAGE_ALWAYS_DUPLICATE" "PROPERTY_USAGE_NEVER_DUPLICATE" "PROPERTY_USAGE_HIGH_END_GFX"
"PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" "PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT"
"PROPERTY_USAGE_KEYING_INCREMENTS" "PROPERTY_USAGE_DEFERRED_SET_RESOURCE"
"PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" "PROPERTY_USAGE_EDITOR_BASIC_SETTING"
"PROPERTY_USAGE_READ_ONLY" "PROPERTY_USAGE_DEFAULT" "PROPERTY_USAGE_NO_EDITOR"
"METHOD_FLAG_NORMAL" "METHOD_FLAG_EDITOR" "METHOD_FLAG_CONST" "METHOD_FLAG_VIRTUAL"
"METHOD_FLAG_VARARG" "METHOD_FLAG_STATIC" "METHOD_FLAG_OBJECT_CORE" "METHOD_FLAGS_DEFAULT"
"TYPE_NIL" "TYPE_BOOL" "TYPE_INT" "TYPE_FLOAT" "TYPE_STRING" "TYPE_VECTOR2" "TYPE_VECTOR2I"
"TYPE_RECT2" "TYPE_RECT2I" "TYPE_VECTOR3" "TYPE_VECTOR3I" "TYPE_TRANSFORM2D" "TYPE_VECTOR4"
"TYPE_VECTOR4I" "TYPE_PLANE" "TYPE_QUATERNION" "TYPE_AABB" "TYPE_BASIS" "TYPE_TRANSFORM3D"
"TYPE_PROJECTION" "TYPE_COLOR" "TYPE_STRING_NAME" "TYPE_NODE_PATH" "TYPE_RID" "TYPE_OBJECT"
"TYPE_CALLABLE" "TYPE_SIGNAL" "TYPE_DICTIONARY" "TYPE_ARRAY" "TYPE_PACKED_BYTE_ARRAY"
"TYPE_PACKED_INT32_ARRAY" "TYPE_PACKED_INT64_ARRAY" "TYPE_PACKED_FLOAT32_ARRAY"
"TYPE_PACKED_FLOAT64_ARRAY" "TYPE_PACKED_STRING_ARRAY" "TYPE_PACKED_VECTOR2_ARRAY"
"TYPE_PACKED_VECTOR3_ARRAY" "TYPE_PACKED_COLOR_ARRAY" "TYPE_MAX" "OP_EQUAL" "OP_NOT_EQUAL"
"OP_LESS" "OP_LESS_EQUAL" "OP_GREATER" "OP_GREATER_EQUAL" "OP_ADD" "OP_SUBTRACT" "OP_MULTIPLY"
"OP_DIVIDE" "OP_NEGATE" "OP_POSITIVE" "OP_MODULE" "OP_POWER" "OP_SHIFT_LEFT" "OP_SHIFT_RIGHT"
"OP_BIT_AND" "OP_BIT_OR" "OP_BIT_XOR" "OP_BIT_NEGATE" "OP_AND" "OP_OR" "OP_XOR" "OP_NOT" "OP_IN"
"OP_MAX"))

View file

@ -597,7 +597,8 @@
((datafile_modifiers
filetype: (identifier) @variable.member)
(#any-of? @variable.member "avs" "bin" "edf" "ehf" "gif" "gpbin" "jpeg" "jpg" "png" "raw" "rgb" "auto"))
(#any-of? @variable.member
"avs" "bin" "edf" "ehf" "gif" "gpbin" "jpeg" "jpg" "png" "raw" "rgb" "auto"))
(macro) @function.macro
@ -608,16 +609,30 @@
((function
name: (identifier) @function.builtin)
(#any-of? @function.builtin "abs" "acos" "acosh" "airy" "arg" "asin" "asinh" "atan" "atan2" "atanh" "besj0" "besj1" "besjn" "besy0" "besy1" "besyn" "besi0" "besi1" "besin" "cbrt" "ceil" "conj" "cos" "cosh" "EllipticK" "EllipticE" "EllipticPi" "erf" "erfc" "exp" "expint" "floor" "gamma" "ibeta" "inverf" "igamma" "imag" "int" "invnorm" "invibeta" "invigamma" "LambertW" "lambertw" "lgamma" "lnGamma" "log" "log10" "norm" "rand" "real" "round" "sgn" "sin" "sinh" "sqrt" "SynchrotronF" "tan" "tanh" "uigamma" "voigt" "zeta" "cerf" "cdawson" "faddeva" "erfi" "FresnelC" "FresnelS" "VP" "VP_fwhm" "Ai" "Bi" "BesselH1" "BesselH2" "BesselJ" "BesselY" "BesselI" "BesselK" "gprintf" "sprintf" "strlen" "strstrt" "substr" "strptime" "srtftime" "system" "trim" "word" "words" "time" "timecolumn" "tm_hour" "tm_mday" "tm_min" "tm_mon" "tm_sec" "tm_wday" "tm_week" "tm_yday" "tm_year" "weekday_iso" "weekday_cdc" "column" "columnhead" "exists" "hsv2rgb" "index" "palette" "rgbcolor" "stringcolumn" "valid" "value" "voxel"))
(#any-of? @function.builtin
"abs" "acos" "acosh" "airy" "arg" "asin" "asinh" "atan" "atan2" "atanh" "besj0" "besj1" "besjn"
"besy0" "besy1" "besyn" "besi0" "besi1" "besin" "cbrt" "ceil" "conj" "cos" "cosh" "EllipticK"
"EllipticE" "EllipticPi" "erf" "erfc" "exp" "expint" "floor" "gamma" "ibeta" "inverf" "igamma"
"imag" "int" "invnorm" "invibeta" "invigamma" "LambertW" "lambertw" "lgamma" "lnGamma" "log"
"log10" "norm" "rand" "real" "round" "sgn" "sin" "sinh" "sqrt" "SynchrotronF" "tan" "tanh"
"uigamma" "voigt" "zeta" "cerf" "cdawson" "faddeva" "erfi" "FresnelC" "FresnelS" "VP" "VP_fwhm"
"Ai" "Bi" "BesselH1" "BesselH2" "BesselJ" "BesselY" "BesselI" "BesselK" "gprintf" "sprintf"
"strlen" "strstrt" "substr" "strptime" "srtftime" "system" "trim" "word" "words" "time"
"timecolumn" "tm_hour" "tm_mday" "tm_min" "tm_mon" "tm_sec" "tm_wday" "tm_week" "tm_yday"
"tm_year" "weekday_iso" "weekday_cdc" "column" "columnhead" "exists" "hsv2rgb" "index" "palette"
"rgbcolor" "stringcolumn" "valid" "value" "voxel"))
((identifier) @variable.builtin
(#match? @variable.builtin "^\\w+_(records|headers|outofrange|invalid|blank|blocks|columns|column_header|index_(min|max)(_x|_y)?|(min|max)(_x|_y)?|mean(_err)?(_x|_y)?|stddev(_err)?(_x|_y)?)$"))
(#match? @variable.builtin
"^\\w+_(records|headers|outofrange|invalid|blank|blocks|columns|column_header|index_(min|max)(_x|_y)?|(min|max)(_x|_y)?|mean(_err)?(_x|_y)?|stddev(_err)?(_x|_y)?)$"))
((identifier) @variable.builtin
(#match? @variable.builtin "^\\w+_(sdd(_x|_y)?|(lo|up)_quartile(_x|_y)?|median(_x|_y)?|sum(sq)?(_x|_y)?|skewness(_err)?(_x|_y)?)$"))
(#match? @variable.builtin
"^\\w+_(sdd(_x|_y)?|(lo|up)_quartile(_x|_y)?|median(_x|_y)?|sum(sq)?(_x|_y)?|skewness(_err)?(_x|_y)?)$"))
((identifier) @variable.builtin
(#match? @variable.builtin "^\\w+_(kurtosis(_err)?(_x|_y)?|adev(_x|_y)?|correlation|slope(_err)?|intercept(_err)?|sumxy|pos(_min|_max)_y|size(_x|_y))$"))
(#match? @variable.builtin
"^\\w+_(kurtosis(_err)?(_x|_y)?|adev(_x|_y)?|correlation|slope(_err)?|intercept(_err)?|sumxy|pos(_min|_max)_y|size(_x|_y))$"))
((identifier) @variable.builtin
(#match? @variable.builtin "^((GPVAL|MOUSE|FIT)_\\w+|GNUTERM|NaN|VoxelDistance|GridDistance|pi)$"))

View file

@ -139,11 +139,16 @@
] @type.builtin
((type_identifier) @type.builtin
(#any-of? @type.builtin "any" "bool" "byte" "comparable" "complex128" "complex64" "error" "float32" "float64" "int" "int16" "int32" "int64" "int8" "rune" "string" "uint" "uint16" "uint32" "uint64" "uint8" "uintptr"))
(#any-of? @type.builtin
"any" "bool" "byte" "comparable" "complex128" "complex64" "error" "float32" "float64" "int"
"int16" "int32" "int64" "int8" "rune" "string" "uint" "uint16" "uint32" "uint64" "uint8"
"uintptr"))
; Builtin functions
((identifier) @function.builtin
(#any-of? @function.builtin "append" "cap" "clear" "close" "complex" "copy" "delete" "imag" "len" "make" "max" "min" "new" "panic" "print" "println" "real" "recover"))
(#any-of? @function.builtin
"append" "cap" "clear" "close" "complex" "copy" "delete" "imag" "len" "make" "max" "min" "new"
"panic" "print" "println" "real" "recover"))
; Delimiters
"." @punctuation.delimiter

View file

@ -3,7 +3,9 @@
(call_expression
(selector_expression) @_function
(#any-of? @_function "regexp.Match" "regexp.MatchReader" "regexp.MatchString" "regexp.Compile" "regexp.CompilePOSIX" "regexp.MustCompile" "regexp.MustCompilePOSIX")
(#any-of? @_function
"regexp.Match" "regexp.MatchReader" "regexp.MatchString" "regexp.Compile" "regexp.CompilePOSIX"
"regexp.MustCompile" "regexp.MustCompilePOSIX")
(argument_list
.
[

View file

@ -586,12 +586,19 @@
; ----------------------------------------------------------------------------
; Exceptions/error handling
((variable) @keyword.exception
(#any-of? @keyword.exception "error" "undefined" "try" "tryJust" "tryAny" "catch" "catches" "catchJust" "handle" "handleJust" "throw" "throwIO" "throwTo" "throwError" "ioError" "mask" "mask_" "uninterruptibleMask" "uninterruptibleMask_" "bracket" "bracket_" "bracketOnErrorSource" "finally" "fail" "onException" "expectationFailure"))
(#any-of? @keyword.exception
"error" "undefined" "try" "tryJust" "tryAny" "catch" "catches" "catchJust" "handle" "handleJust"
"throw" "throwIO" "throwTo" "throwError" "ioError" "mask" "mask_" "uninterruptibleMask"
"uninterruptibleMask_" "bracket" "bracket_" "bracketOnErrorSource" "finally" "fail"
"onException" "expectationFailure"))
; ----------------------------------------------------------------------------
; Debugging
((variable) @keyword.debug
(#any-of? @keyword.debug "trace" "traceId" "traceShow" "traceShowId" "traceWith" "traceShowWith" "traceStack" "traceIO" "traceM" "traceShowM" "traceEvent" "traceEventWith" "traceEventIO" "flushEventLog" "traceMarker" "traceMarkerIO"))
(#any-of? @keyword.debug
"trace" "traceId" "traceShow" "traceShowId" "traceWith" "traceShowWith" "traceStack" "traceIO"
"traceM" "traceShowM" "traceEvent" "traceEventWith" "traceEventIO" "flushEventLog" "traceMarker"
"traceMarkerIO"))
; ----------------------------------------------------------------------------
; Fields

View file

@ -68,144 +68,43 @@
; built-in variables
((identifier) @variable.builtin
(#any-of? @variable.builtin "programCount" "programIndex" "taskCount" "taskCount0" "taskCount1" "taskCount2" "taskIndex" "taskIndex0" "taskIndex1" "taskIndex2" "threadCount" "threadIndex"))
(#any-of? @variable.builtin
"programCount" "programIndex" "taskCount" "taskCount0" "taskCount1" "taskCount2" "taskIndex"
"taskIndex0" "taskIndex1" "taskIndex2" "threadCount" "threadIndex"))
; preprocessor constants
((identifier) @constant.builtin
(#any-of? @constant.builtin "ISPC" "ISPC_FP16_SUPPORTED" "ISPC_FP64_SUPPORTED" "ISPC_LLVM_INTRINSICS_ENABLED" "ISPC_MAJOR_VERSION" "ISPC_MINOR_VERSION" "ISPC_POINTER_SIZE" "ISPC_TARGET_AVX" "ISPC_TARGET_AVX2" "ISPC_TARGET_AVX512KNL" "ISPC_TARGET_AVX512SKX" "ISPC_TARGET_AVX512SPR" "ISPC_TARGET_NEON" "ISPC_TARGET_SSE2" "ISPC_TARGET_SSE4" "ISPC_UINT_IS_DEFINED" "PI" "TARGET_ELEMENT_WIDTH" "TARGET_WIDTH"))
(#any-of? @constant.builtin
"ISPC" "ISPC_FP16_SUPPORTED" "ISPC_FP64_SUPPORTED" "ISPC_LLVM_INTRINSICS_ENABLED"
"ISPC_MAJOR_VERSION" "ISPC_MINOR_VERSION" "ISPC_POINTER_SIZE" "ISPC_TARGET_AVX"
"ISPC_TARGET_AVX2" "ISPC_TARGET_AVX512KNL" "ISPC_TARGET_AVX512SKX" "ISPC_TARGET_AVX512SPR"
"ISPC_TARGET_NEON" "ISPC_TARGET_SSE2" "ISPC_TARGET_SSE4" "ISPC_UINT_IS_DEFINED" "PI"
"TARGET_ELEMENT_WIDTH" "TARGET_WIDTH"))
; standard library built-in
((type_identifier) @type.builtin
(#lua-match? @type.builtin "^RNGState"))
; format-ignore
(call_expression
function: (identifier) @function.builtin
(#any-of? @function.builtin
"abs"
"acos"
"all"
"alloca"
"and"
"any"
"aos_to_soa2"
"aos_to_soa3"
"aos_to_soa4"
"asin"
"assert"
"assume"
"atan"
"atan2"
"atomic_add_global"
"atomic_add_local"
"atomic_and_global"
"atomic_and_local"
"atomic_compare_exchange_global"
"atomic_compare_exchange_local"
"atomic_max_global"
"atomic_max_local"
"atomic_min_global"
"atomic_min_local"
"atomic_or_global"
"atomic_or_local"
"atomic_subtract_global"
"atomic_subtract_local"
"atomic_swap_global"
"atomic_swap_local"
"atomic_xor_global"
"atomic_xor_local"
"avg_down"
"avg_up"
"broadcast"
"ceil"
"clamp"
"clock"
"cos"
"count_leading_zeros"
"count_trailing_zeros"
"doublebits"
"exclusive_scan_add"
"exclusive_scan_and"
"exclusive_scan_or"
"exp"
"extract"
"fastmath"
"float16bits"
"floatbits"
"float_to_half"
"float_to_half_fast"
"float_to_srgb8"
"floor"
"frandom"
"frexp"
"half_to_float"
"half_to_float_fast"
"insert"
"intbits"
"invoke_sycl"
"isnan"
"ISPCAlloc"
"ISPCLaunch"
"ISPCSync"
"lanemask"
"ldexp"
"log"
"max"
"memcpy"
"memcpy64"
"memmove"
"memmove64"
"memory_barrier"
"memset"
"memset64"
"min"
"none"
"num_cores"
"or"
"packed_load_active"
"packed_store_active"
"packed_store_active2"
"packmask"
"popcnt"
"pow"
"prefetch_l1"
"prefetch_l2"
"prefetch_l3"
"prefetch_nt"
"prefetchw_l1"
"prefetchw_l2"
"prefetchw_l3"
"print"
"random"
"rcp"
"rcp_fast"
"rdrand"
"reduce_add"
"reduce_equal"
"reduce_max"
"reduce_min"
"rotate"
"round"
"rsqrt"
"rsqrt_fast"
"saturating_add"
"saturating_div"
"saturating_mul"
"saturating_sub"
"seed_rng"
"select"
"shift"
"shuffle"
"signbits"
"sign_extend"
"sin"
"sincos"
"soa_to_aos2"
"soa_to_aos3"
"soa_to_aos4"
"sqrt"
"streaming_load"
"streaming_load_uniform"
"streaming_store"
"tan"
"trunc"))
"abs" "acos" "all" "alloca" "and" "any" "aos_to_soa2" "aos_to_soa3" "aos_to_soa4" "asin"
"assert" "assume" "atan" "atan2" "atomic_add_global" "atomic_add_local" "atomic_and_global"
"atomic_and_local" "atomic_compare_exchange_global" "atomic_compare_exchange_local"
"atomic_max_global" "atomic_max_local" "atomic_min_global" "atomic_min_local" "atomic_or_global"
"atomic_or_local" "atomic_subtract_global" "atomic_subtract_local" "atomic_swap_global"
"atomic_swap_local" "atomic_xor_global" "atomic_xor_local" "avg_down" "avg_up" "broadcast"
"ceil" "clamp" "clock" "cos" "count_leading_zeros" "count_trailing_zeros" "doublebits"
"exclusive_scan_add" "exclusive_scan_and" "exclusive_scan_or" "exp" "extract" "fastmath"
"float16bits" "floatbits" "float_to_half" "float_to_half_fast" "float_to_srgb8" "floor"
"frandom" "frexp" "half_to_float" "half_to_float_fast" "insert" "intbits" "invoke_sycl" "isnan"
"ISPCAlloc" "ISPCLaunch" "ISPCSync" "lanemask" "ldexp" "log" "max" "memcpy" "memcpy64" "memmove"
"memmove64" "memory_barrier" "memset" "memset64" "min" "none" "num_cores" "or"
"packed_load_active" "packed_store_active" "packed_store_active2" "packmask" "popcnt" "pow"
"prefetch_l1" "prefetch_l2" "prefetch_l3" "prefetch_nt" "prefetchw_l1" "prefetchw_l2"
"prefetchw_l3" "print" "random" "rcp" "rcp_fast" "rdrand" "reduce_add" "reduce_equal"
"reduce_max" "reduce_min" "rotate" "round" "rsqrt" "rsqrt_fast" "saturating_add"
"saturating_div" "saturating_mul" "saturating_sub" "seed_rng" "select" "shift" "shuffle"
"signbits" "sign_extend" "sin" "sincos" "soa_to_aos2" "soa_to_aos3" "soa_to_aos4" "sqrt"
"streaming_load" "streaming_load_uniform" "streaming_store" "tan" "trunc")
)

View file

@ -67,53 +67,21 @@
; (when (info :macro)
; (print name))))
((sym_lit) @function.macro
; format-ignore
(#any-of? @function.macro
; special forms
"break"
"def" "do"
"fn"
"if"
"quasiquote" "quote"
"set" "splice"
"unquote" "upscope"
"var"
"break" "def" "do" "fn" "if" "quasiquote" "quote" "set" "splice" "unquote" "upscope" "var"
"while"
; macros
"%=" "*="
"++" "+="
"--" "-="
"->" "->>" "-?>" "-?>>"
"/="
"and" "as->" "as-macro" "as?->" "assert"
"case" "catseq" "chr" "comment" "compif" "comptime" "compwhen"
"cond" "coro"
"def-" "default" "defdyn" "defer" "defmacro" "defmacro-"
"defn" "defn-"
"delay" "doc"
"each" "eachk" "eachp"
"eachy"
"%=" "*=" "++" "+=" "--" "-=" "->" "->>" "-?>" "-?>>" "/=" "and" "as->" "as-macro" "as?->"
"assert" "case" "catseq" "chr" "comment" "compif" "comptime" "compwhen" "cond" "coro" "def-"
"default" "defdyn" "defer" "defmacro" "defmacro-" "defn" "defn-" "delay" "doc" "each" "eachk"
"eachp" "eachy"
; XXX: obsolete
"edefer"
"ev/do-thread" "ev/gather" "ev/spawn" "ev/spawn-thread"
"ev/with-deadline"
"ffi/defbind"
"fiber-fn"
"for" "forever" "forv"
"generate"
"if-let" "if-not" "if-with" "import"
"juxt"
"label" "let" "loop"
"match"
"or"
"prompt" "protect"
"repeat"
"seq" "short-fn"
"tabseq" "toggle" "tracev" "try"
"unless" "use"
"var-" "varfn"
"when" "when-let" "when-with"
"with" "with-dyns" "with-syms" "with-vars"))
"edefer" "ev/do-thread" "ev/gather" "ev/spawn" "ev/spawn-thread" "ev/with-deadline"
"ffi/defbind" "fiber-fn" "for" "forever" "forv" "generate" "if-let" "if-not" "if-with" "import"
"juxt" "label" "let" "loop" "match" "or" "prompt" "protect" "repeat" "seq" "short-fn" "tabseq"
"toggle" "tracev" "try" "unless" "use" "var-" "varfn" "when" "when-let" "when-with" "with"
"with-dyns" "with-syms" "with-vars"))
; All builtin functions
;
@ -124,189 +92,83 @@
; (cfunction? (info :value))))
; (print name))))
((sym_lit) @function.builtin
; format-ignore
(#any-of? @function.builtin
"%" "*" "+" "-" "/"
"<" "<=" "=" ">" ">="
"%" "*" "+" "-" "/" "<" "<=" "=" ">" ">="
; debugging -- start janet with -d and use (debug) to see these
".break" ".breakall" ".bytecode"
".clear" ".clearall"
".disasm"
".fiber" ".fn" ".frame"
".locals"
".next" ".nextc"
".ppasm"
".signal" ".slot" ".slots" ".source" ".stack" ".step"
".break" ".breakall" ".bytecode" ".clear" ".clearall" ".disasm" ".fiber" ".fn" ".frame"
".locals" ".next" ".nextc" ".ppasm" ".signal" ".slot" ".slots" ".source" ".stack" ".step"
; back to regularly scheduled program
"abstract?" "accumulate" "accumulate2" "all" "all-bindings"
"all-dynamics" "any?" "apply"
"array"
"array/clear" "array/concat" "array/ensure" "array/fill"
"array/insert" "array/new" "array/new-filled" "array/peek"
"array/pop" "array/push" "array/remove" "array/slice" "array/trim"
"array?"
"asm"
"bad-compile" "bad-parse"
"band" "blshift" "bnot"
"boolean?"
"bor" "brshift" "brushift"
"buffer"
"buffer/bit" "buffer/bit-clear" "buffer/bit-set"
"buffer/bit-toggle" "buffer/blit" "buffer/clear" "buffer/fill"
"buffer/format" "buffer/new" "buffer/new-filled" "buffer/popn"
"buffer/push" "buffer/push-at" "buffer/push-byte"
"buffer/push-string" "buffer/push-word" "buffer/slice"
"buffer/trim"
"buffer?"
"bxor"
"bytes?"
"cancel"
"cfunction?"
"cli-main"
"cmp" "comp" "compare" "compare<" "compare<=" "compare="
"compare>" "compare>="
"compile" "complement" "count" "curenv"
"debug"
"debug/arg-stack" "debug/break" "debug/fbreak" "debug/lineage"
"debug/stack" "debug/stacktrace" "debug/step" "debug/unbreak"
"debug/unfbreak"
"debugger" "debugger-on-status"
"dec" "deep-not=" "deep=" "defglobal" "describe"
"dictionary?"
"disasm" "distinct" "div" "doc*" "doc-format" "doc-of" "dofile"
"drop" "drop-until" "drop-while" "dyn"
"eflush" "empty?" "env-lookup"
"eprin" "eprinf" "eprint" "eprintf" "error" "errorf"
"ev/acquire-lock" "ev/acquire-rlock" "ev/acquire-wlock"
"ev/all-tasks" "ev/call" "ev/cancel" "ev/capacity" "ev/chan"
"ev/chan-close" "ev/chunk" "ev/close" "ev/count" "ev/deadline"
"ev/full" "ev/give" "ev/give-supervisor" "ev/go" "ev/lock"
"ev/read" "ev/release-lock" "ev/release-rlock"
"ev/release-wlock" "ev/rselect" "ev/rwlock" "ev/select"
"ev/sleep" "ev/take" "ev/thread" "ev/thread-chan" "ev/write"
"eval" "eval-string" "even?" "every?" "extreme"
"false?"
"ffi/align" "ffi/call" "ffi/calling-convetions" "ffi/close"
"ffi/context" "ffi/free" "ffi/jitfn" "ffi/lookup" "ffi/malloc"
"ffi/native" "ffi/pointer-buffer" "ffi/pointer-cfunction"
"ffi/read" "ffi/signature" "ffi/size" "ffi/struct"
"ffi/trampoline" "ffi/write"
"fiber/can-resume?" "fiber/current" "fiber/getenv"
"fiber/last-value" "fiber/maxstack" "fiber/new" "fiber/root"
"fiber/setenv" "fiber/setmaxstack" "fiber/status"
"fiber?"
"file/close" "file/flush" "file/lines" "file/open" "file/read"
"file/seek" "file/tell" "file/temp" "file/write"
"filter" "find" "find-index" "first" "flatten" "flatten-into"
"flush" "flycheck" "freeze" "frequencies" "from-pairs"
"function?"
"gccollect" "gcinterval" "gcsetinterval"
"gensym" "get" "get-in" "getline" "getproto" "group-by"
"has-key?" "has-value?" "hash"
"idempotent?" "identity" "import*" "in" "inc" "index-of"
"indexed?"
"int/s64" "int/to-bytes" "int/to-number" "int/u64"
"int?"
"interleave" "interpose" "invert"
"juxt*"
"keep" "keep-syntax" "keep-syntax!" "keys"
"keyword"
"keyword/slice"
"keyword?"
"kvs"
"last" "length" "load-image"
"macex" "macex1" "maclintf"
"make-env" "make-image" "map" "mapcat" "marshal"
"math/abs" "math/acos" "math/acosh" "math/asin" "math/asinh"
"math/atan" "math/atan2" "math/atanh" "math/cbrt" "math/ceil"
"math/cos" "math/cosh" "math/erf" "math/erfc" "math/exp"
"math/exp2" "math/expm1" "math/floor" "math/gamma" "math/gcd"
"math/hypot" "math/lcm" "math/log" "math/log-gamma"
"math/log10" "math/log1p" "math/log2" "math/next" "math/pow"
"math/random" "math/rng" "math/rng-buffer" "math/rng-int"
"math/rng-uniform" "math/round" "math/seedrandom" "math/sin"
"math/sinh" "math/sqrt" "math/tan" "math/tanh" "math/trunc"
"max" "max-of" "mean" "memcmp" "merge" "merge-into"
"merge-module" "min" "min-of" "mod"
"module/add-paths" "module/expand-path" "module/find"
"module/value"
"nan?" "nat?" "native" "neg?"
"net/accept" "net/accept-loop" "net/address"
"net/address-unpack" "net/chunk" "net/close" "net/connect"
"net/flush" "net/listen" "net/localname" "net/peername"
"net/read" "net/recv-from" "net/send-to" "net/server"
"net/setsockopt" "net/shutdown" "net/write"
"next"
"nil?"
"not" "not="
"number?"
"odd?" "one?"
"os/arch" "os/cd" "os/chmod" "os/clock" "os/compiler"
"os/cpu-count" "os/cryptorand" "os/cwd" "os/date" "os/dir"
"os/environ" "os/execute" "os/exit" "os/getenv" "os/link"
"os/lstat" "os/mkdir" "os/mktime" "os/open" "os/perm-int"
"os/perm-string" "os/pipe" "os/proc-close" "os/proc-kill"
"os/proc-wait" "os/readlink" "os/realpath" "os/rename"
"os/rm" "os/rmdir" "os/setenv" "os/shell" "os/sleep"
"os/spawn" "os/stat" "os/symlink" "os/time" "os/touch"
"os/umask" "os/which"
"pairs"
"parse" "parse-all"
"parser/byte" "parser/clone" "parser/consume" "parser/eof"
"parser/error" "parser/flush" "parser/has-more"
"parser/insert" "parser/new" "parser/produce" "parser/state"
"parser/status" "parser/where"
"partial" "partition" "partition-by"
"peg/compile" "peg/find" "peg/find-all" "peg/match"
"peg/replace" "peg/replace-all"
"pos?" "postwalk" "pp" "prewalk"
"prin" "prinf" "print" "printf"
"product" "propagate" "put" "put-in"
"quit"
"range" "reduce" "reduce2" "repl" "require" "resume"
"return" "reverse" "reverse!" "run-context"
"sandbox" "scan-number" "setdyn" "signal" "slice" "slurp"
"some" "sort" "sort-by" "sorted" "sorted-by" "spit"
"string"
"string/ascii-lower" "string/ascii-upper" "string/bytes"
"string/check-set" "string/find" "string/find-all"
"string/format" "string/from-bytes" "string/has-prefix?"
"string/has-suffix?" "string/join" "string/repeat"
"string/replace" "string/replace-all" "string/reverse"
"string/slice" "string/split" "string/trim" "string/triml"
"string/trimr"
"string?"
"struct"
"struct/getproto" "struct/proto-flatten" "struct/to-table"
"struct/with-proto"
"struct?"
"sum"
"symbol"
"symbol/slice"
"symbol?"
"table"
"table/clear" "table/clone" "table/getproto" "table/new"
"table/proto-flatten" "table/rawget" "table/setproto"
"table/to-struct"
"table?"
"take" "take-until" "take-while"
"abstract?" "accumulate" "accumulate2" "all" "all-bindings" "all-dynamics" "any?" "apply"
"array" "array/clear" "array/concat" "array/ensure" "array/fill" "array/insert" "array/new"
"array/new-filled" "array/peek" "array/pop" "array/push" "array/remove" "array/slice"
"array/trim" "array?" "asm" "bad-compile" "bad-parse" "band" "blshift" "bnot" "boolean?" "bor"
"brshift" "brushift" "buffer" "buffer/bit" "buffer/bit-clear" "buffer/bit-set"
"buffer/bit-toggle" "buffer/blit" "buffer/clear" "buffer/fill" "buffer/format" "buffer/new"
"buffer/new-filled" "buffer/popn" "buffer/push" "buffer/push-at" "buffer/push-byte"
"buffer/push-string" "buffer/push-word" "buffer/slice" "buffer/trim" "buffer?" "bxor" "bytes?"
"cancel" "cfunction?" "cli-main" "cmp" "comp" "compare" "compare<" "compare<=" "compare="
"compare>" "compare>=" "compile" "complement" "count" "curenv" "debug" "debug/arg-stack"
"debug/break" "debug/fbreak" "debug/lineage" "debug/stack" "debug/stacktrace" "debug/step"
"debug/unbreak" "debug/unfbreak" "debugger" "debugger-on-status" "dec" "deep-not=" "deep="
"defglobal" "describe" "dictionary?" "disasm" "distinct" "div" "doc*" "doc-format" "doc-of"
"dofile" "drop" "drop-until" "drop-while" "dyn" "eflush" "empty?" "env-lookup" "eprin" "eprinf"
"eprint" "eprintf" "error" "errorf" "ev/acquire-lock" "ev/acquire-rlock" "ev/acquire-wlock"
"ev/all-tasks" "ev/call" "ev/cancel" "ev/capacity" "ev/chan" "ev/chan-close" "ev/chunk"
"ev/close" "ev/count" "ev/deadline" "ev/full" "ev/give" "ev/give-supervisor" "ev/go" "ev/lock"
"ev/read" "ev/release-lock" "ev/release-rlock" "ev/release-wlock" "ev/rselect" "ev/rwlock"
"ev/select" "ev/sleep" "ev/take" "ev/thread" "ev/thread-chan" "ev/write" "eval" "eval-string"
"even?" "every?" "extreme" "false?" "ffi/align" "ffi/call" "ffi/calling-convetions" "ffi/close"
"ffi/context" "ffi/free" "ffi/jitfn" "ffi/lookup" "ffi/malloc" "ffi/native" "ffi/pointer-buffer"
"ffi/pointer-cfunction" "ffi/read" "ffi/signature" "ffi/size" "ffi/struct" "ffi/trampoline"
"ffi/write" "fiber/can-resume?" "fiber/current" "fiber/getenv" "fiber/last-value"
"fiber/maxstack" "fiber/new" "fiber/root" "fiber/setenv" "fiber/setmaxstack" "fiber/status"
"fiber?" "file/close" "file/flush" "file/lines" "file/open" "file/read" "file/seek" "file/tell"
"file/temp" "file/write" "filter" "find" "find-index" "first" "flatten" "flatten-into" "flush"
"flycheck" "freeze" "frequencies" "from-pairs" "function?" "gccollect" "gcinterval"
"gcsetinterval" "gensym" "get" "get-in" "getline" "getproto" "group-by" "has-key?" "has-value?"
"hash" "idempotent?" "identity" "import*" "in" "inc" "index-of" "indexed?" "int/s64"
"int/to-bytes" "int/to-number" "int/u64" "int?" "interleave" "interpose" "invert" "juxt*" "keep"
"keep-syntax" "keep-syntax!" "keys" "keyword" "keyword/slice" "keyword?" "kvs" "last" "length"
"load-image" "macex" "macex1" "maclintf" "make-env" "make-image" "map" "mapcat" "marshal"
"math/abs" "math/acos" "math/acosh" "math/asin" "math/asinh" "math/atan" "math/atan2"
"math/atanh" "math/cbrt" "math/ceil" "math/cos" "math/cosh" "math/erf" "math/erfc" "math/exp"
"math/exp2" "math/expm1" "math/floor" "math/gamma" "math/gcd" "math/hypot" "math/lcm" "math/log"
"math/log-gamma" "math/log10" "math/log1p" "math/log2" "math/next" "math/pow" "math/random"
"math/rng" "math/rng-buffer" "math/rng-int" "math/rng-uniform" "math/round" "math/seedrandom"
"math/sin" "math/sinh" "math/sqrt" "math/tan" "math/tanh" "math/trunc" "max" "max-of" "mean"
"memcmp" "merge" "merge-into" "merge-module" "min" "min-of" "mod" "module/add-paths"
"module/expand-path" "module/find" "module/value" "nan?" "nat?" "native" "neg?" "net/accept"
"net/accept-loop" "net/address" "net/address-unpack" "net/chunk" "net/close" "net/connect"
"net/flush" "net/listen" "net/localname" "net/peername" "net/read" "net/recv-from" "net/send-to"
"net/server" "net/setsockopt" "net/shutdown" "net/write" "next" "nil?" "not" "not=" "number?"
"odd?" "one?" "os/arch" "os/cd" "os/chmod" "os/clock" "os/compiler" "os/cpu-count"
"os/cryptorand" "os/cwd" "os/date" "os/dir" "os/environ" "os/execute" "os/exit" "os/getenv"
"os/link" "os/lstat" "os/mkdir" "os/mktime" "os/open" "os/perm-int" "os/perm-string" "os/pipe"
"os/proc-close" "os/proc-kill" "os/proc-wait" "os/readlink" "os/realpath" "os/rename" "os/rm"
"os/rmdir" "os/setenv" "os/shell" "os/sleep" "os/spawn" "os/stat" "os/symlink" "os/time"
"os/touch" "os/umask" "os/which" "pairs" "parse" "parse-all" "parser/byte" "parser/clone"
"parser/consume" "parser/eof" "parser/error" "parser/flush" "parser/has-more" "parser/insert"
"parser/new" "parser/produce" "parser/state" "parser/status" "parser/where" "partial"
"partition" "partition-by" "peg/compile" "peg/find" "peg/find-all" "peg/match" "peg/replace"
"peg/replace-all" "pos?" "postwalk" "pp" "prewalk" "prin" "prinf" "print" "printf" "product"
"propagate" "put" "put-in" "quit" "range" "reduce" "reduce2" "repl" "require" "resume" "return"
"reverse" "reverse!" "run-context" "sandbox" "scan-number" "setdyn" "signal" "slice" "slurp"
"some" "sort" "sort-by" "sorted" "sorted-by" "spit" "string" "string/ascii-lower"
"string/ascii-upper" "string/bytes" "string/check-set" "string/find" "string/find-all"
"string/format" "string/from-bytes" "string/has-prefix?" "string/has-suffix?" "string/join"
"string/repeat" "string/replace" "string/replace-all" "string/reverse" "string/slice"
"string/split" "string/trim" "string/triml" "string/trimr" "string?" "struct" "struct/getproto"
"struct/proto-flatten" "struct/to-table" "struct/with-proto" "struct?" "sum" "symbol"
"symbol/slice" "symbol?" "table" "table/clear" "table/clone" "table/getproto" "table/new"
"table/proto-flatten" "table/rawget" "table/setproto" "table/to-struct" "table?" "take"
"take-until" "take-while"
; XXX: obsolete
"tarray/buffer" "tarray/copy-bytes" "tarray/length"
"tarray/new" "tarray/properties" "tarray/slice"
"tarray/swap-bytes"
"tarray/buffer" "tarray/copy-bytes" "tarray/length" "tarray/new" "tarray/properties"
"tarray/slice" "tarray/swap-bytes"
; XXX: obsolete
"thread/close" "thread/current" "thread/exit" "thread/new"
"thread/receive" "thread/send"
"thread/close" "thread/current" "thread/exit" "thread/new" "thread/receive" "thread/send"
; end of obsolete
"trace" "true?" "truthy?"
"tuple"
"tuple/brackets" "tuple/setmap" "tuple/slice"
"tuple/sourcemap" "tuple/type"
"tuple?"
"type"
"unmarshal" "untrace" "update" "update-in"
"values" "varglobal"
"walk" "warn-compile"
"xprin" "xprinf" "xprint" "xprintf"
"yield"
"zero?" "zipcoll"))
"trace" "true?" "truthy?" "tuple" "tuple/brackets" "tuple/setmap" "tuple/slice"
"tuple/sourcemap" "tuple/type" "tuple?" "type" "unmarshal" "untrace" "update" "update-in"
"values" "varglobal" "walk" "warn-compile" "xprin" "xprinf" "xprint" "xprintf" "yield" "zero?"
"zipcoll"))

View file

@ -57,198 +57,27 @@
; jq -n 'builtins | map(split("/")[0]) | unique | .[]'
((funcname) @function.builtin
; format-ignore
(#any-of? @function.builtin
"IN"
"INDEX"
"JOIN"
"acos"
"acosh"
"add"
"all"
"any"
"arrays"
"ascii_downcase"
"ascii_upcase"
"asin"
"asinh"
"atan"
"atan2"
"atanh"
"booleans"
"bsearch"
"builtins"
"capture"
"cbrt"
"ceil"
"combinations"
"contains"
"copysign"
"cos"
"cosh"
"debug"
"del"
"delpaths"
"drem"
"empty"
"endswith"
"env"
"erf"
"erfc"
"error"
"exp"
"exp10"
"exp2"
"explode"
"expm1"
"fabs"
"fdim"
"finites"
"first"
"flatten"
"floor"
"fma"
"fmax"
"fmin"
"fmod"
"format"
"frexp"
"from_entries"
"fromdate"
"fromdateiso8601"
"fromjson"
"fromstream"
"gamma"
"get_jq_origin"
"get_prog_origin"
"get_search_list"
"getpath"
"gmtime"
"group_by"
"gsub"
"halt"
"halt_error"
"has"
"hypot"
"implode"
"in"
"index"
"indices"
"infinite"
"input"
"input_filename"
"input_line_number"
"inputs"
"inside"
"isempty"
"isfinite"
"isinfinite"
"isnan"
"isnormal"
"iterables"
"j0"
"j1"
"jn"
"join"
"keys"
"keys_unsorted"
"last"
"ldexp"
"leaf_paths"
"length"
"lgamma"
"lgamma_r"
"limit"
"localtime"
"log"
"log10"
"log1p"
"log2"
"logb"
"ltrimstr"
"map"
"map_values"
"match"
"max"
"max_by"
"min"
"min_by"
"mktime"
"modf"
"modulemeta"
"nan"
"nearbyint"
"nextafter"
"nexttoward"
"normals"
"not"
"now"
"nth"
"nulls"
"numbers"
"objects"
"path"
"paths"
"pow"
"pow10"
"range"
"recurse"
"recurse_down"
"remainder"
"repeat"
"reverse"
"rindex"
"rint"
"round"
"rtrimstr"
"scalars"
"scalars_or_empty"
"scalb"
"scalbln"
"scan"
"select"
"setpath"
"significand"
"sin"
"sinh"
"sort"
"sort_by"
"split"
"splits"
"sqrt"
"startswith"
"stderr"
"strflocaltime"
"strftime"
"strings"
"strptime"
"sub"
"tan"
"tanh"
"test"
"tgamma"
"to_entries"
"todate"
"todateiso8601"
"tojson"
"tonumber"
"tostream"
"tostring"
"transpose"
"trunc"
"truncate_stream"
"type"
"unique"
"unique_by"
"until"
"utf8bytelength"
"values"
"walk"
"while"
"with_entries"
"y0"
"y1"
"yn"))
"IN" "INDEX" "JOIN" "acos" "acosh" "add" "all" "any" "arrays" "ascii_downcase" "ascii_upcase"
"asin" "asinh" "atan" "atan2" "atanh" "booleans" "bsearch" "builtins" "capture" "cbrt" "ceil"
"combinations" "contains" "copysign" "cos" "cosh" "debug" "del" "delpaths" "drem" "empty"
"endswith" "env" "erf" "erfc" "error" "exp" "exp10" "exp2" "explode" "expm1" "fabs" "fdim"
"finites" "first" "flatten" "floor" "fma" "fmax" "fmin" "fmod" "format" "frexp" "from_entries"
"fromdate" "fromdateiso8601" "fromjson" "fromstream" "gamma" "get_jq_origin" "get_prog_origin"
"get_search_list" "getpath" "gmtime" "group_by" "gsub" "halt" "halt_error" "has" "hypot"
"implode" "in" "index" "indices" "infinite" "input" "input_filename" "input_line_number"
"inputs" "inside" "isempty" "isfinite" "isinfinite" "isnan" "isnormal" "iterables" "j0" "j1"
"jn" "join" "keys" "keys_unsorted" "last" "ldexp" "leaf_paths" "length" "lgamma" "lgamma_r"
"limit" "localtime" "log" "log10" "log1p" "log2" "logb" "ltrimstr" "map" "map_values" "match"
"max" "max_by" "min" "min_by" "mktime" "modf" "modulemeta" "nan" "nearbyint" "nextafter"
"nexttoward" "normals" "not" "now" "nth" "nulls" "numbers" "objects" "path" "paths" "pow"
"pow10" "range" "recurse" "recurse_down" "remainder" "repeat" "reverse" "rindex" "rint" "round"
"rtrimstr" "scalars" "scalars_or_empty" "scalb" "scalbln" "scan" "select" "setpath"
"significand" "sin" "sinh" "sort" "sort_by" "split" "splits" "sqrt" "startswith" "stderr"
"strflocaltime" "strftime" "strings" "strptime" "sub" "tan" "tanh" "test" "tgamma" "to_entries"
"todate" "todateiso8601" "tojson" "tonumber" "tostream" "tostring" "transpose" "trunc"
"truncate_stream" "type" "unique" "unique_by" "until" "utf8bytelength" "values" "walk" "while"
"with_entries" "y0" "y1" "yn"))
; Keywords
[

View file

@ -63,7 +63,13 @@
; Builtins
((identifier) @function.builtin
(#any-of? @function.builtin "_abstracttype" "_apply_iterate" "_apply_pure" "_call_in_world" "_call_in_world_total" "_call_latest" "_equiv_typedef" "_expr" "_primitivetype" "_setsuper!" "_structtype" "_typebody!" "_typevar" "applicable" "apply_type" "arrayref" "arrayset" "arraysize" "const_arrayref" "donotdelete" "fieldtype" "get_binding_type" "getfield" "ifelse" "invoke" "isa" "isdefined" "modifyfield!" "nfields" "replacefield!" "set_binding_type!" "setfield!" "sizeof" "svec" "swapfield!" "throw" "tuple" "typeassert" "typeof"))
(#any-of? @function.builtin
"_abstracttype" "_apply_iterate" "_apply_pure" "_call_in_world" "_call_in_world_total"
"_call_latest" "_equiv_typedef" "_expr" "_primitivetype" "_setsuper!" "_structtype" "_typebody!"
"_typevar" "applicable" "apply_type" "arrayref" "arrayset" "arraysize" "const_arrayref"
"donotdelete" "fieldtype" "get_binding_type" "getfield" "ifelse" "invoke" "isa" "isdefined"
"modifyfield!" "nfields" "replacefield!" "set_binding_type!" "setfield!" "sizeof" "svec"
"swapfield!" "throw" "tuple" "typeassert" "typeof"))
; Parameters
(parameter_list
@ -135,217 +141,36 @@
; type_names = sort(union(get_types(Core), get_types(Base)))
;
((identifier) @type.builtin
; format-ignore
(#any-of? @type.builtin
"AbstractArray"
"AbstractChannel"
"AbstractChar"
"AbstractDict"
"AbstractDisplay"
"AbstractFloat"
"AbstractIrrational"
"AbstractLock"
"AbstractMatch"
"AbstractMatrix"
"AbstractPattern"
"AbstractRange"
"AbstractSet"
"AbstractSlices"
"AbstractString"
"AbstractUnitRange"
"AbstractVecOrMat"
"AbstractVector"
"Any"
"ArgumentError"
"Array"
"AssertionError"
"Atomic"
"BigFloat"
"BigInt"
"BitArray"
"BitMatrix"
"BitSet"
"BitVector"
"Bool"
"BoundsError"
"By"
"CanonicalIndexError"
"CapturedException"
"CartesianIndex"
"CartesianIndices"
"Cchar"
"Cdouble"
"Cfloat"
"Channel"
"Char"
"Cint"
"Cintmax_t"
"Clong"
"Clonglong"
"Cmd"
"Colon"
"ColumnSlices"
"Complex"
"ComplexF16"
"ComplexF32"
"ComplexF64"
"ComposedFunction"
"CompositeException"
"ConcurrencyViolationError"
"Condition"
"Cptrdiff_t"
"Cshort"
"Csize_t"
"Cssize_t"
"Cstring"
"Cuchar"
"Cuint"
"Cuintmax_t"
"Culong"
"Culonglong"
"Cushort"
"Cvoid"
"Cwchar_t"
"Cwstring"
"DataType"
"DenseArray"
"DenseMatrix"
"DenseVecOrMat"
"DenseVector"
"Dict"
"DimensionMismatch"
"Dims"
"DivideError"
"DomainError"
"EOFError"
"Enum"
"ErrorException"
"Exception"
"ExponentialBackOff"
"Expr"
"Float16"
"Float32"
"Float64"
"Function"
"GlobalRef"
"HTML"
"IO"
"IOBuffer"
"IOContext"
"IOStream"
"IdDict"
"IndexCartesian"
"IndexLinear"
"IndexStyle"
"InexactError"
"InitError"
"Int"
"Int128"
"Int16"
"Int32"
"Int64"
"Int8"
"Integer"
"InterruptException"
"InvalidStateException"
"Irrational"
"KeyError"
"LazyString"
"LinRange"
"LineNumberNode"
"LinearIndices"
"LoadError"
"Lt"
"MIME"
"Matrix"
"Method"
"MethodError"
"Missing"
"MissingException"
"Module"
"NTuple"
"NamedTuple"
"Nothing"
"Number"
"Ordering"
"OrdinalRange"
"OutOfMemoryError"
"OverflowError"
"Pair"
"ParseError"
"PartialQuickSort"
"Perm"
"PermutedDimsArray"
"Pipe"
"ProcessFailedException"
"Ptr"
"QuoteNode"
"Rational"
"RawFD"
"ReadOnlyMemoryError"
"Real"
"ReentrantLock"
"Ref"
"Regex"
"RegexMatch"
"Returns"
"ReverseOrdering"
"RoundingMode"
"RowSlices"
"SegmentationFault"
"Set"
"Signed"
"Slices"
"Some"
"SpinLock"
"StackFrame"
"StackOverflowError"
"StackTrace"
"Stateful"
"StepRange"
"StepRangeLen"
"StridedArray"
"StridedMatrix"
"StridedVecOrMat"
"StridedVector"
"String"
"StringIndexError"
"SubArray"
"SubString"
"SubstitutionString"
"Symbol"
"SystemError"
"Task"
"TaskFailedException"
"Text"
"TextDisplay"
"Timer"
"Tmstruct"
"Tuple"
"Type"
"TypeError"
"TypeVar"
"UInt"
"UInt128"
"UInt16"
"UInt32"
"UInt64"
"UInt8"
"UndefInitializer"
"UndefKeywordError"
"UndefRefError"
"UndefVarError"
"Union"
"UnionAll"
"UnitRange"
"Unsigned"
"Val"
"VecElement"
"VecOrMat"
"Vector"
"VersionNumber"
"WeakKeyDict"
"WeakRef"))
"AbstractArray" "AbstractChannel" "AbstractChar" "AbstractDict" "AbstractDisplay"
"AbstractFloat" "AbstractIrrational" "AbstractLock" "AbstractMatch" "AbstractMatrix"
"AbstractPattern" "AbstractRange" "AbstractSet" "AbstractSlices" "AbstractString"
"AbstractUnitRange" "AbstractVecOrMat" "AbstractVector" "Any" "ArgumentError" "Array"
"AssertionError" "Atomic" "BigFloat" "BigInt" "BitArray" "BitMatrix" "BitSet" "BitVector" "Bool"
"BoundsError" "By" "CanonicalIndexError" "CapturedException" "CartesianIndex" "CartesianIndices"
"Cchar" "Cdouble" "Cfloat" "Channel" "Char" "Cint" "Cintmax_t" "Clong" "Clonglong" "Cmd" "Colon"
"ColumnSlices" "Complex" "ComplexF16" "ComplexF32" "ComplexF64" "ComposedFunction"
"CompositeException" "ConcurrencyViolationError" "Condition" "Cptrdiff_t" "Cshort" "Csize_t"
"Cssize_t" "Cstring" "Cuchar" "Cuint" "Cuintmax_t" "Culong" "Culonglong" "Cushort" "Cvoid"
"Cwchar_t" "Cwstring" "DataType" "DenseArray" "DenseMatrix" "DenseVecOrMat" "DenseVector" "Dict"
"DimensionMismatch" "Dims" "DivideError" "DomainError" "EOFError" "Enum" "ErrorException"
"Exception" "ExponentialBackOff" "Expr" "Float16" "Float32" "Float64" "Function" "GlobalRef"
"HTML" "IO" "IOBuffer" "IOContext" "IOStream" "IdDict" "IndexCartesian" "IndexLinear"
"IndexStyle" "InexactError" "InitError" "Int" "Int128" "Int16" "Int32" "Int64" "Int8" "Integer"
"InterruptException" "InvalidStateException" "Irrational" "KeyError" "LazyString" "LinRange"
"LineNumberNode" "LinearIndices" "LoadError" "Lt" "MIME" "Matrix" "Method" "MethodError"
"Missing" "MissingException" "Module" "NTuple" "NamedTuple" "Nothing" "Number" "Ordering"
"OrdinalRange" "OutOfMemoryError" "OverflowError" "Pair" "ParseError" "PartialQuickSort" "Perm"
"PermutedDimsArray" "Pipe" "ProcessFailedException" "Ptr" "QuoteNode" "Rational" "RawFD"
"ReadOnlyMemoryError" "Real" "ReentrantLock" "Ref" "Regex" "RegexMatch" "Returns"
"ReverseOrdering" "RoundingMode" "RowSlices" "SegmentationFault" "Set" "Signed" "Slices" "Some"
"SpinLock" "StackFrame" "StackOverflowError" "StackTrace" "Stateful" "StepRange" "StepRangeLen"
"StridedArray" "StridedMatrix" "StridedVecOrMat" "StridedVector" "String" "StringIndexError"
"SubArray" "SubString" "SubstitutionString" "Symbol" "SystemError" "Task" "TaskFailedException"
"Text" "TextDisplay" "Timer" "Tmstruct" "Tuple" "Type" "TypeError" "TypeVar" "UInt" "UInt128"
"UInt16" "UInt32" "UInt64" "UInt8" "UndefInitializer" "UndefKeywordError" "UndefRefError"
"UndefVarError" "Union" "UnionAll" "UnitRange" "Unsigned" "Val" "VecElement" "VecOrMat" "Vector"
"VersionNumber" "WeakKeyDict" "WeakRef"))
((identifier) @variable.builtin
(#any-of? @variable.builtin "begin" "end")

View file

@ -58,7 +58,11 @@
(type_identifier) @type.definition)
((type_identifier) @type.builtin
(#any-of? @type.builtin "Byte" "Short" "Int" "Long" "UByte" "UShort" "UInt" "ULong" "Float" "Double" "Boolean" "Char" "String" "Array" "ByteArray" "ShortArray" "IntArray" "LongArray" "UByteArray" "UShortArray" "UIntArray" "ULongArray" "FloatArray" "DoubleArray" "BooleanArray" "CharArray" "Map" "Set" "List" "EmptyMap" "EmptySet" "EmptyList" "MutableMap" "MutableSet" "MutableList"))
(#any-of? @type.builtin
"Byte" "Short" "Int" "Long" "UByte" "UShort" "UInt" "ULong" "Float" "Double" "Boolean" "Char"
"String" "Array" "ByteArray" "ShortArray" "IntArray" "LongArray" "UByteArray" "UShortArray"
"UIntArray" "ULongArray" "FloatArray" "DoubleArray" "BooleanArray" "CharArray" "Map" "Set"
"List" "EmptyMap" "EmptySet" "EmptyList" "MutableMap" "MutableSet" "MutableList"))
(package_header
"package" @keyword
@ -141,7 +145,13 @@
(call_expression
.
(simple_identifier) @function.builtin
(#any-of? @function.builtin "arrayOf" "arrayOfNulls" "byteArrayOf" "shortArrayOf" "intArrayOf" "longArrayOf" "ubyteArrayOf" "ushortArrayOf" "uintArrayOf" "ulongArrayOf" "floatArrayOf" "doubleArrayOf" "booleanArrayOf" "charArrayOf" "emptyArray" "mapOf" "setOf" "listOf" "emptyMap" "emptySet" "emptyList" "mutableMapOf" "mutableSetOf" "mutableListOf" "print" "println" "error" "TODO" "run" "runCatching" "repeat" "lazy" "lazyOf" "enumValues" "enumValueOf" "assert" "check" "checkNotNull" "require" "requireNotNull" "with" "suspend" "synchronized"))
(#any-of? @function.builtin
"arrayOf" "arrayOfNulls" "byteArrayOf" "shortArrayOf" "intArrayOf" "longArrayOf" "ubyteArrayOf"
"ushortArrayOf" "uintArrayOf" "ulongArrayOf" "floatArrayOf" "doubleArrayOf" "booleanArrayOf"
"charArrayOf" "emptyArray" "mapOf" "setOf" "listOf" "emptyMap" "emptySet" "emptyList"
"mutableMapOf" "mutableSetOf" "mutableListOf" "print" "println" "error" "TODO" "run"
"runCatching" "repeat" "lazy" "lazyOf" "enumValues" "enumValueOf" "assert" "check"
"checkNotNull" "require" "requireNotNull" "with" "suspend" "synchronized"))
; Literals
[

View file

@ -32,7 +32,10 @@
((call_expression
function: (symbol) @function.builtin)
(#any-of? @function.builtin "ABSOLUTE" "ALIAS" "ADDR" "ALIGN" "ALIGNOF" "BASE" "BLOCK" "CHIP" "DATA_SEGMENT_ALIGN" "DATA_SEGMENT_END" "DATA_SEGMENT_RELRO_END" "END" "LENGTH" "LOADADDR" "LOG2CEIL" "MAX" "MIN" "NEXT" "ORIGIN" "SEGMENT_START" "SIZEOF" "BYTE" "FILL" "LONG" "SHORT" "QUAD" "SQUAD" "WORD"))
(#any-of? @function.builtin
"ABSOLUTE" "ALIAS" "ADDR" "ALIGN" "ALIGNOF" "BASE" "BLOCK" "CHIP" "DATA_SEGMENT_ALIGN"
"DATA_SEGMENT_END" "DATA_SEGMENT_RELRO_END" "END" "LENGTH" "LOADADDR" "LOG2CEIL" "MAX" "MIN"
"NEXT" "ORIGIN" "SEGMENT_START" "SIZEOF" "BYTE" "FILL" "LONG" "SHORT" "QUAD" "SQUAD" "WORD"))
[
"KEEP"

View file

@ -222,16 +222,14 @@
(function_call
(identifier) @function.builtin
; format-ignore
(#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"
"rawequal" "rawget" "rawlen" "rawset" "require" "select" "setfenv" "setmetatable"
"tonumber" "tostring" "type" "unpack" "xpcall"
"__add" "__band" "__bnot" "__bor" "__bxor" "__call" "__concat" "__div" "__eq" "__gc"
"__idiv" "__index" "__le" "__len" "__lt" "__metatable" "__mod" "__mul" "__name" "__newindex"
"__pairs" "__pow" "__shl" "__shr" "__sub" "__tostring" "__unm"))
"assert" "collectgarbage" "dofile" "error" "getfenv" "getmetatable" "ipairs" "load" "loadfile"
"loadstring" "module" "next" "pairs" "pcall" "print" "rawequal" "rawget" "rawlen" "rawset"
"require" "select" "setfenv" "setmetatable" "tonumber" "tostring" "type" "unpack" "xpcall"
"__add" "__band" "__bnot" "__bor" "__bxor" "__call" "__concat" "__div" "__eq" "__gc" "__idiv"
"__index" "__le" "__len" "__lt" "__metatable" "__mod" "__mul" "__name" "__newindex" "__pairs"
"__pow" "__shl" "__shr" "__sub" "__tostring" "__unm"))
; Others
(comment) @comment @spell

View file

@ -20,7 +20,8 @@
(string
content: _ @injection.content)))
(#set! injection.language "vim")
(#any-of? @_vimcmd_identifier "vim.cmd" "vim.api.nvim_command" "vim.api.nvim_command" "vim.api.nvim_exec2"))
(#any-of? @_vimcmd_identifier
"vim.cmd" "vim.api.nvim_command" "vim.api.nvim_command" "vim.api.nvim_exec2"))
((function_call
name: (_) @_vimcmd_identifier

View file

@ -213,14 +213,12 @@
(function_call
(identifier) @function.builtin
; format-ignore
(#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"
"rawequal" "rawget" "rawlen" "rawset" "require" "select" "setfenv" "setmetatable"
"tonumber" "tostring" "type" "unpack" "xpcall" "typeof"
"__add" "__band" "__bnot" "__bor" "__bxor" "__call" "__concat" "__div" "__eq" "__gc"
"assert" "collectgarbage" "dofile" "error" "getfenv" "getmetatable" "ipairs" "load" "loadfile"
"loadstring" "module" "next" "pairs" "pcall" "print" "rawequal" "rawget" "rawlen" "rawset"
"require" "select" "setfenv" "setmetatable" "tonumber" "tostring" "type" "unpack" "xpcall"
"typeof" "__add" "__band" "__bnot" "__bor" "__bxor" "__call" "__concat" "__div" "__eq" "__gc"
"__idiv" "__index" "__le" "__len" "__lt" "__metatable" "__mod" "__mul" "__name" "__newindex"
"__pairs" "__pow" "__shl" "__shr" "__sub" "__tostring" "__unm"))

View file

@ -24,7 +24,10 @@
(rule
(targets
(word) @function.builtin
(#any-of? @function.builtin ".DEFAULT" ".SUFFIXES" ".DELETE_ON_ERROR" ".EXPORT_ALL_VARIABLES" ".IGNORE" ".INTERMEDIATE" ".LOW_RESOLUTION_TIME" ".NOTPARALLEL" ".ONESHELL" ".PHONY" ".POSIX" ".PRECIOUS" ".SECONDARY" ".SECONDEXPANSION" ".SILENT" ".SUFFIXES")))
(#any-of? @function.builtin
".DEFAULT" ".SUFFIXES" ".DELETE_ON_ERROR" ".EXPORT_ALL_VARIABLES" ".IGNORE" ".INTERMEDIATE"
".LOW_RESOLUTION_TIME" ".NOTPARALLEL" ".ONESHELL" ".PHONY" ".POSIX" ".PRECIOUS" ".SECONDARY"
".SECONDEXPANSION" ".SILENT" ".SUFFIXES")))
(rule
[
@ -79,7 +82,10 @@
(variable_assignment
(word) @variable.builtin
(#any-of? @variable.builtin ".DEFAULT_GOAL" ".EXTRA_PREREQS" ".FEATURES" ".INCLUDE_DIRS" ".RECIPEPREFIX" ".SHELLFLAGS" ".VARIABLES" "MAKEARGS" "MAKEFILE_LIST" "MAKEFLAGS" "MAKE_RESTARTS" "MAKE_TERMERR" "MAKE_TERMOUT" "SHELL"))
(#any-of? @variable.builtin
".DEFAULT_GOAL" ".EXTRA_PREREQS" ".FEATURES" ".INCLUDE_DIRS" ".RECIPEPREFIX" ".SHELLFLAGS"
".VARIABLES" "MAKEARGS" "MAKEFILE_LIST" "MAKEFLAGS" "MAKE_RESTARTS" "MAKE_TERMERR"
"MAKE_TERMOUT" "SHELL"))
; Use string to match bash
(variable_reference

View file

@ -75,7 +75,9 @@
(body
(let
name: (identifier) @constant.builtin
(#not-any-of? @constant.builtin "command" "depfile" "deps" "msvc_deps_prefix" "description" "dyndep" "generator" "in" "in_newline" "out" "restat" "rspfile" "rspfile_content" "pool"))))
(#not-any-of? @constant.builtin
"command" "depfile" "deps" "msvc_deps_prefix" "description" "dyndep" "generator" "in"
"in_newline" "out" "restat" "rspfile" "rspfile_content" "pool"))))
;
; Expansion

View file

@ -112,18 +112,40 @@
; builtin functions (without builtins prefix)
(variable_expression
name: (identifier) @function.builtin
; format-ignore
(#any-of? @function.builtin
; nix eval --impure --expr 'with builtins; filter (x: !(elem x [ "abort" "derivation" "import" "throw" ]) && isFunction builtins.${x}) (attrNames builtins)'
"add" "addErrorContext" "all" "any" "appendContext" "attrNames" "attrValues" "baseNameOf" "bitAnd" "bitOr" "bitXor" "break" "catAttrs" "ceil" "compareVersions" "concatLists" "concatMap" "concatStringsSep" "deepSeq" "derivationStrict" "dirOf" "div" "elem" "elemAt" "fetchGit" "fetchMercurial" "fetchTarball" "fetchTree" "fetchurl" "filter" "filterSource" "findFile" "floor" "foldl'" "fromJSON" "fromTOML" "functionArgs" "genList" "genericClosure" "getAttr" "getContext" "getEnv" "getFlake" "groupBy" "hasAttr" "hasContext" "hashFile" "hashString" "head" "intersectAttrs" "isAttrs" "isBool" "isFloat" "isFunction" "isInt" "isList" "isNull" "isPath" "isString" "length" "lessThan" "listToAttrs" "map" "mapAttrs" "match" "mul" "parseDrvName" "partition" "path" "pathExists" "placeholder" "readDir" "readFile" "removeAttrs" "replaceStrings" "scopedImport" "seq" "sort" "split" "splitVersion" "storePath" "stringLength" "sub" "substring" "tail" "toFile" "toJSON" "toPath" "toString" "toXML" "trace" "traceVerbose" "tryEval" "typeOf" "unsafeDiscardOutputDependency" "unsafeDiscardStringContext" "unsafeGetAttrPos" "zipAttrsWith"
"add" "addErrorContext" "all" "any" "appendContext" "attrNames" "attrValues" "baseNameOf"
"bitAnd" "bitOr" "bitXor" "break" "catAttrs" "ceil" "compareVersions" "concatLists" "concatMap"
"concatStringsSep" "deepSeq" "derivationStrict" "dirOf" "div" "elem" "elemAt" "fetchGit"
"fetchMercurial" "fetchTarball" "fetchTree" "fetchurl" "filter" "filterSource" "findFile"
"floor" "foldl'" "fromJSON" "fromTOML" "functionArgs" "genList" "genericClosure" "getAttr"
"getContext" "getEnv" "getFlake" "groupBy" "hasAttr" "hasContext" "hashFile" "hashString" "head"
"intersectAttrs" "isAttrs" "isBool" "isFloat" "isFunction" "isInt" "isList" "isNull" "isPath"
"isString" "length" "lessThan" "listToAttrs" "map" "mapAttrs" "match" "mul" "parseDrvName"
"partition" "path" "pathExists" "placeholder" "readDir" "readFile" "removeAttrs"
"replaceStrings" "scopedImport" "seq" "sort" "split" "splitVersion" "storePath" "stringLength"
"sub" "substring" "tail" "toFile" "toJSON" "toPath" "toString" "toXML" "trace" "traceVerbose"
"tryEval" "typeOf" "unsafeDiscardOutputDependency" "unsafeDiscardStringContext"
"unsafeGetAttrPos" "zipAttrsWith"
; primops, `__<tab>` in `nix repl`
"__add" "__filter" "__isFunction" "__split" "__addErrorContext" "__filterSource" "__isInt" "__splitVersion" "__all" "__findFile" "__isList" "__storeDir" "__any" "__floor" "__isPath" "__storePath" "__appendContext" "__foldl'" "__isString" "__stringLength" "__attrNames" "__fromJSON" "__langVersion" "__sub" "__attrValues" "__functionArgs" "__length" "__substring" "__bitAnd" "__genList" "__lessThan" "__tail" "__bitOr" "__genericClosure" "__listToAttrs" "__toFile" "__bitXor" "__getAttr" "__mapAttrs" "__toJSON" "__catAttrs" "__getContext" "__match" "__toPath" "__ceil" "__getEnv" "__mul" "__toXML" "__compareVersions" "__getFlake" "__nixPath" "__trace" "__concatLists" "__groupBy" "__nixVersion" "__traceVerbose" "__concatMap" "__hasAttr" "__parseDrvName" "__tryEval" "__concatStringsSep" "__hasContext" "__partition" "__typeOf" "__currentSystem" "__hashFile" "__path" "__unsafeDiscardOutputDependency" "__currentTime" "__hashString" "__pathExists" "__unsafeDiscardStringContext" "__deepSeq" "__head" "__readDir" "__unsafeGetAttrPos" "__div" "__intersectAttrs" "__readFile" "__zipAttrsWith" "__elem" "__isAttrs" "__replaceStrings" "__elemAt" "__isBool" "__seq" "__fetchurl" "__isFloat" "__sort")
"__add" "__filter" "__isFunction" "__split" "__addErrorContext" "__filterSource" "__isInt"
"__splitVersion" "__all" "__findFile" "__isList" "__storeDir" "__any" "__floor" "__isPath"
"__storePath" "__appendContext" "__foldl'" "__isString" "__stringLength" "__attrNames"
"__fromJSON" "__langVersion" "__sub" "__attrValues" "__functionArgs" "__length" "__substring"
"__bitAnd" "__genList" "__lessThan" "__tail" "__bitOr" "__genericClosure" "__listToAttrs"
"__toFile" "__bitXor" "__getAttr" "__mapAttrs" "__toJSON" "__catAttrs" "__getContext" "__match"
"__toPath" "__ceil" "__getEnv" "__mul" "__toXML" "__compareVersions" "__getFlake" "__nixPath"
"__trace" "__concatLists" "__groupBy" "__nixVersion" "__traceVerbose" "__concatMap" "__hasAttr"
"__parseDrvName" "__tryEval" "__concatStringsSep" "__hasContext" "__partition" "__typeOf"
"__currentSystem" "__hashFile" "__path" "__unsafeDiscardOutputDependency" "__currentTime"
"__hashString" "__pathExists" "__unsafeDiscardStringContext" "__deepSeq" "__head" "__readDir"
"__unsafeGetAttrPos" "__div" "__intersectAttrs" "__readFile" "__zipAttrsWith" "__elem"
"__isAttrs" "__replaceStrings" "__elemAt" "__isBool" "__seq" "__fetchurl" "__isFloat" "__sort")
)
; constants
(variable_expression
name: (identifier) @constant.builtin
; format-ignore
(#any-of? @constant.builtin
; nix eval --impure --expr 'with builtins; filter (x: !(isFunction builtins.${x} || isBool builtins.${x})) (attrNames builtins)'
"builtins" "currentSystem" "currentTime" "langVersion" "nixPath" "nixVersion" "null" "storeDir"))

View file

@ -8,7 +8,9 @@
; Types
;------
((type_constructor) @type.builtin
(#any-of? @type.builtin "int" "char" "bytes" "string" "float" "bool" "unit" "exn" "array" "list" "option" "int32" "int64" "nativeint" "format6" "lazy_t"))
(#any-of? @type.builtin
"int" "char" "bytes" "string" "float" "bool" "unit" "exn" "array" "list" "option" "int32"
"int64" "nativeint" "format6" "lazy_t"))
[
(class_name)

View file

@ -129,7 +129,13 @@
((type
(identifier) @type.builtin)
(#any-of? @type.builtin "bool" "byte" "b8" "b16" "b32" "b64" "int" "i8" "i16" "i32" "i64" "i128" "uint" "u8" "u16" "u32" "u64" "u128" "uintptr" "i16le" "i32le" "i64le" "i128le" "u16le" "u32le" "u64le" "u128le" "i16be" "i32be" "i64be" "i128be" "u16be" "u32be" "u64be" "u128be" "float" "double" "f16" "f32" "f64" "f16le" "f32le" "f64le" "f16be" "f32be" "f64be" "complex32" "complex64" "complex128" "complex_float" "complex_double" "quaternion64" "quaternion128" "quaternion256" "rune" "string" "cstring" "rawptr" "typeid" "any"))
(#any-of? @type.builtin
"bool" "byte" "b8" "b16" "b32" "b64" "int" "i8" "i16" "i32" "i64" "i128" "uint" "u8" "u16" "u32"
"u64" "u128" "uintptr" "i16le" "i32le" "i64le" "i128le" "u16le" "u32le" "u64le" "u128le" "i16be"
"i32be" "i64be" "i128be" "u16be" "u32be" "u64be" "u128be" "float" "double" "f16" "f32" "f64"
"f16le" "f32le" "f64le" "f16be" "f32be" "f64be" "complex32" "complex64" "complex128"
"complex_float" "complex_double" "quaternion64" "quaternion128" "quaternion256" "rune" "string"
"cstring" "rawptr" "typeid" "any"))
"..." @type.builtin

View file

@ -169,7 +169,16 @@
(expression_statement
(bareword))
] @function.builtin
(#any-of? @function.builtin "accept" "atan2" "bind" "binmode" "bless" "crypt" "chmod" "chown" "connect" "die" "dbmopen" "exec" "fcntl" "flock" "formline" "getpriority" "getprotobynumber" "gethostbyaddr" "getnetbyaddr" "getservbyname" "getservbyport" "getsockopt" "glob" "index" "ioctl" "join" "kill" "link" "listen" "mkdir" "msgctl" "msgget" "msgrcv" "msgsend" "open" "opendir" "print" "printf" "push" "pack" "pipe" "return" "rename" "rindex" "read" "recv" "reverse" "say" "select" "seek" "semctl" "semget" "semop" "send" "setpgrp" "setpriority" "seekdir" "setsockopt" "shmctl" "shmread" "shmwrite" "shutdown" "socket" "socketpair" "split" "sprintf" "splice" "substr" "system" "symlink" "syscall" "sysopen" "sysseek" "sysread" "syswrite" "tie" "truncate" "unlink" "unpack" "utime" "unshift" "vec" "warn" "waitpid"))
(#any-of? @function.builtin
"accept" "atan2" "bind" "binmode" "bless" "crypt" "chmod" "chown" "connect" "die" "dbmopen"
"exec" "fcntl" "flock" "formline" "getpriority" "getprotobynumber" "gethostbyaddr"
"getnetbyaddr" "getservbyname" "getservbyport" "getsockopt" "glob" "index" "ioctl" "join" "kill"
"link" "listen" "mkdir" "msgctl" "msgget" "msgrcv" "msgsend" "open" "opendir" "print" "printf"
"push" "pack" "pipe" "return" "rename" "rindex" "read" "recv" "reverse" "say" "select" "seek"
"semctl" "semget" "semop" "send" "setpgrp" "setpriority" "seekdir" "setsockopt" "shmctl"
"shmread" "shmwrite" "shutdown" "socket" "socketpair" "split" "sprintf" "splice" "substr"
"system" "symlink" "syscall" "sysopen" "sysseek" "sysread" "syswrite" "tie" "truncate" "unlink"
"unpack" "utime" "unshift" "vec" "warn" "waitpid"))
(function) @function
@ -187,7 +196,8 @@
(varname)
(filehandle)
] @variable.builtin
(#any-of? @variable.builtin "ENV" "ARGV" "INC" "ARGVOUT" "SIG" "STDIN" "STDOUT" "STDERR" "a" "b" "_"))
(#any-of? @variable.builtin
"ENV" "ARGV" "INC" "ARGVOUT" "SIG" "STDIN" "STDOUT" "STDERR" "a" "b" "_"))
((varname) @variable.builtin
; highlights all the reserved ^ vars like ${^THINGS}

View file

@ -35,7 +35,9 @@
(_
(string_value) @injection.content))))
(#set! injection.language "bash")
(#any-of? @_shell_func_identifier "shell_exec" "escapeshellarg" "escapeshellcmd" "exec" "passthru" "proc_open" "shell_exec" "system"))
(#any-of? @_shell_func_identifier
"shell_exec" "escapeshellarg" "escapeshellcmd" "exec" "passthru" "proc_open" "shell_exec"
"system"))
(expression_statement
(shell_command_expression

View file

@ -4,18 +4,16 @@
((tag_name) @constant.builtin
; https://www.script-example.com/html-tag-liste
; format-ignore
(#any-of? @constant.builtin
"head" "title" "base" "link" "meta" "style"
"body" "article" "section" "nav" "aside" "h1" "h2" "h3" "h4" "h5" "h6" "hgroup" "header" "footer" "address"
"p" "hr" "pre" "blockquote" "ol" "ul" "menu" "li" "dl" "dt" "dd" "figure" "figcaption" "main" "div"
"a" "em" "strong" "small" "s" "cite" "q" "dfn" "abbr" "ruby" "rt" "rp" "data" "time" "code" "var" "samp" "kbd" "sub" "sup" "i" "b" "u" "mark" "bdi" "bdo" "span" "br" "wbr"
"ins" "del"
"picture" "source" "img" "iframe" "embed" "object" "param" "video" "audio" "track" "map" "area"
"table" "caption" "colgroup" "col" "tbody" "thead" "tfoot" "tr" "td" "th "
"form" "label" "input" "button" "select" "datalist" "optgroup" "option" "textarea" "output" "progress" "meter" "fieldset" "legend"
"details" "summary" "dialog"
"script" "noscript" "template" "slot" "canvas"))
"head" "title" "base" "link" "meta" "style" "body" "article" "section" "nav" "aside" "h1" "h2"
"h3" "h4" "h5" "h6" "hgroup" "header" "footer" "address" "p" "hr" "pre" "blockquote" "ol" "ul"
"menu" "li" "dl" "dt" "dd" "figure" "figcaption" "main" "div" "a" "em" "strong" "small" "s"
"cite" "q" "dfn" "abbr" "ruby" "rt" "rp" "data" "time" "code" "var" "samp" "kbd" "sub" "sup" "i"
"b" "u" "mark" "bdi" "bdo" "span" "br" "wbr" "ins" "del" "picture" "source" "img" "iframe"
"embed" "object" "param" "video" "audio" "track" "map" "area" "table" "caption" "colgroup" "col"
"tbody" "thead" "tfoot" "tr" "td" "th " "form" "label" "input" "button" "select" "datalist"
"optgroup" "option" "textarea" "output" "progress" "meter" "fieldset" "legend" "details"
"summary" "dialog" "script" "noscript" "template" "slot" "canvas"))
(id) @constant

View file

@ -133,7 +133,9 @@
(#lua-match? @type "^[A-Z]"))
((identifier) @type.builtin
(#any-of? @type.builtin "Boolean" "Integer" "Float" "String" "Array" "Hash" "Regexp" "Variant" "Data" "Undef" "Default" "File"))
(#any-of? @type.builtin
"Boolean" "Integer" "Float" "String" "Array" "Hash" "Regexp" "Variant" "Data" "Undef" "Default"
"File"))
; "Namespaces"
(class_identifier

View file

@ -17,11 +17,9 @@
(#lua-match? @constant.builtin "^__[a-zA-Z0-9_]*__$"))
((identifier) @constant.builtin
; format-ignore
(#any-of? @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"))
"_" @constant.builtin ; match wildcard
@ -89,7 +87,14 @@
; Builtin functions
((call
function: (identifier) @function.builtin)
(#any-of? @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__"))
(#any-of? @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__"))
; Function definitions
(function_definition
@ -408,23 +413,24 @@
(#any-of? @constructor "__new__" "__init__"))
((identifier) @type.builtin
; format-ignore
(#any-of? @type.builtin
; https://docs.python.org/3/library/exceptions.html
"BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError"
"EOFError" "FloatingPointError" "GeneratorExit" "ImportError" "ModuleNotFoundError" "IndexError" "KeyError"
"KeyboardInterrupt" "MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError"
"ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError"
"SystemError" "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError"
"UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError"
"BlockingIOError" "ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError"
"ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError" "InterruptedError"
"IsADirectoryError" "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning"
"BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError"
"AttributeError" "EOFError" "FloatingPointError" "GeneratorExit" "ImportError"
"ModuleNotFoundError" "IndexError" "KeyError" "KeyboardInterrupt" "MemoryError" "NameError"
"NotImplementedError" "OSError" "OverflowError" "RecursionError" "ReferenceError" "RuntimeError"
"StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError" "SystemError"
"SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError"
"UnicodeDecodeError" "UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError"
"IOError" "WindowsError" "BlockingIOError" "ChildProcessError" "ConnectionError"
"BrokenPipeError" "ConnectionAbortedError" "ConnectionRefusedError" "ConnectionResetError"
"FileExistsError" "FileNotFoundError" "InterruptedError" "IsADirectoryError"
"NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning"
"UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning"
"FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning"
; https://docs.python.org/3/library/stdtypes.html
"bool" "int" "float" "complex" "list" "tuple" "range" "str"
"bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type" "object"))
"bool" "int" "float" "complex" "list" "tuple" "range" "str" "bytes" "bytearray" "memoryview"
"set" "frozenset" "dict" "type" "object"))
; Regex from the `re` module
(call

View file

@ -2,7 +2,7 @@
(list)
(named_node)
(grouping)
(predicate) ; WIP to newline wrap any-of?
(predicate)
"["
] @indent.begin

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,8 @@
((define
option: (option_name) @_yy
value: (dstring) @injection.content)
(#any-of? @_yy "YYPEEK" "YYSKIP" "YYBACKUP" "YYBACKUPCTX" "YYRESTORE" "YYRESTORECTX" "YYFILL" "YYSHIFT")
(#any-of? @_yy
"YYPEEK" "YYSKIP" "YYBACKUP" "YYBACKUPCTX" "YYRESTORE" "YYRESTORECTX" "YYFILL" "YYSHIFT")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.parent))

View file

@ -30,20 +30,15 @@
name: (type) @keyword.import)
(#eq? @keyword.import "include"))
((directive
name: (type) @function.builtin)
; format-ignore
(directive
name: (type) @function.builtin
(#any-of? @function.builtin
; https://docutils.sourceforge.io/docs/ref/rst/directives.html
"attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition"
"image" "figure"
"topic" "sidebar" "line-block" "parsed-literal" "code" "math" "rubric" "epigraph" "highlights" "pull-quote" "compound" "container"
"table" "csv-table" "list-table"
"contents" "sectnum" "section-numbering" "header" "footer"
"target-notes"
"meta"
"replace" "unicode" "date"
"raw" "class" "role" "default-role" "title" "restructuredtext-test-directive"))
"image" "figure" "topic" "sidebar" "line-block" "parsed-literal" "code" "math" "rubric"
"epigraph" "highlights" "pull-quote" "compound" "container" "table" "csv-table" "list-table"
"contents" "sectnum" "section-numbering" "header" "footer" "target-notes" "meta" "replace"
"unicode" "date" "raw" "class" "role" "default-role" "title" "restructuredtext-test-directive"))
; Blocks
[
@ -87,25 +82,10 @@
(role) @function
((role) @function.builtin
; format-ignore
(#any-of? @function.builtin
; https://docutils.sourceforge.io/docs/ref/rst/roles.html
":emphasis:"
":literal:"
":code:"
":math:"
":pep-reference:"
":PEP:"
":rfc-reference:"
":RFC:"
":strong:"
":subscript:"
":sub:"
":superscript:"
":sup:"
":title-reference:"
":title:"
":t:"
":emphasis:" ":literal:" ":code:" ":math:" ":pep-reference:" ":PEP:" ":rfc-reference:" ":RFC:"
":strong:" ":subscript:" ":sub:" ":superscript:" ":sup:" ":title-reference:" ":title:" ":t:"
":raw:"))
[

View file

@ -6,7 +6,10 @@
name: (type) @_type
body: (body) @injection.content)
(#set! injection.language "rst")
(#any-of? @_type "attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition" "line-block" "parsed-literal" "epigraph" "highlights" "pull-quote" "compound" "header" "footer" "meta" "replace"))
(#any-of? @_type
"attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition"
"line-block" "parsed-literal" "epigraph" "highlights" "pull-quote" "compound" "header" "footer"
"meta" "replace"))
; Directives with nested content without arguments, but with options
((directive
@ -16,7 +19,9 @@
(options)
(content) @injection.content))
(#set! injection.language "rst")
(#any-of? @_type "attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition" "line-block" "parsed-literal" "compound"))
(#any-of? @_type
"attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition"
"line-block" "parsed-literal" "compound"))
; Directives with nested content with arguments and options
((directive
@ -25,7 +30,9 @@
(body
(content) @injection.content))
(#set! injection.language "rst")
(#any-of? @_type "figure" "topic" "sidebar" "container" "table" "list-table" "class" "role" "restructuredtext-test-directive"))
(#any-of? @_type
"figure" "topic" "sidebar" "container" "table" "list-table" "class" "role"
"restructuredtext-test-directive"))
; Special directives
((directive

View file

@ -125,7 +125,8 @@
] @variable.member
((identifier) @constant.builtin
(#any-of? @constant.builtin "__callee__" "__dir__" "__id__" "__method__" "__send__" "__ENCODING__" "__FILE__" "__LINE__"))
(#any-of? @constant.builtin
"__callee__" "__dir__" "__id__" "__method__" "__send__" "__ENCODING__" "__FILE__" "__LINE__"))
((constant) @type
(#not-lua-match? @type "^[A-Z0-9_]+$"))

View file

@ -65,7 +65,8 @@
(list
(list
(symbol) @variable))
(#any-of? @_f "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax"))
(#any-of? @_f
"let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax"))
; operators
((symbol) @operator
@ -73,7 +74,12 @@
; keyword
((symbol) @keyword
(#any-of? @keyword "define" "lambda" "λ" "begin" "do" "define-syntax" "and" "or" "if" "cond" "case" "when" "unless" "else" "=>" "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax" "set!" "syntax-rules" "identifier-syntax" "quote" "unquote" "quote-splicing" "quasiquote" "unquote-splicing" "delay" "assert" "library" "export" "import" "rename" "only" "except" "prefix"))
(#any-of? @keyword
"define" "lambda" "λ" "begin" "do" "define-syntax" "and" "or" "if" "cond" "case" "when"
"unless" "else" "=>" "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*"
"letrec-syntax" "set!" "syntax-rules" "identifier-syntax" "quote" "unquote" "quote-splicing"
"quasiquote" "unquote-splicing" "delay" "assert" "library" "export" "import" "rename" "only"
"except" "prefix"))
((symbol) @keyword.conditional
(#any-of? @keyword.conditional "if" "cond" "case" "when" "unless"))
@ -99,76 +105,54 @@
; builtin procedures
; procedures in R5RS and R6RS but not in R6RS-lib
((symbol) @function.builtin
; format-ignore
(#any-of? @function.builtin
; eq
"eqv?" "eq?" "equal?"
; number
"number?" "complex?" "real?" "rational?" "integer?"
"exact?" "inexact?"
"zero?" "positive?" "negative?" "odd?" "even?" "finite?" "infinite?" "nan?"
"max" "min"
"abs" "quotient" "remainder" "modulo"
"div" "div0" "mod" "mod0" "div-and-mod" "div0-and-mod0"
"gcd" "lcm" "numerator" "denominator"
"floor" "ceiling" "truncate" "round"
"rationalize"
"exp" "log" "sin" "cos" "tan" "asin" "acos" "atan"
"sqrt" "expt"
"exact-integer-sqrt"
"make-rectangular" "make-polar" "real-part" "imag-part" "magnitude" "angle"
"real-valued" "rational-valued?" "integer-valued?"
"exact" "inexact" "exact->inexact" "inexact->exact"
"number->string" "string->number"
"number?" "complex?" "real?" "rational?" "integer?" "exact?" "inexact?" "zero?" "positive?"
"negative?" "odd?" "even?" "finite?" "infinite?" "nan?" "max" "min" "abs" "quotient" "remainder"
"modulo" "div" "div0" "mod" "mod0" "div-and-mod" "div0-and-mod0" "gcd" "lcm" "numerator"
"denominator" "floor" "ceiling" "truncate" "round" "rationalize" "exp" "log" "sin" "cos" "tan"
"asin" "acos" "atan" "sqrt" "expt" "exact-integer-sqrt" "make-rectangular" "make-polar"
"real-part" "imag-part" "magnitude" "angle" "real-valued" "rational-valued?" "integer-valued?"
"exact" "inexact" "exact->inexact" "inexact->exact" "number->string" "string->number"
; boolean
"boolean?" "not" "boolean=?"
; pair
"pair?" "cons"
"car" "cdr"
"caar" "cadr" "cdar" "cddr"
"caaar" "caadr" "cadar" "caddr" "cdaar" "cdadr" "cddar" "cdddr"
"caaaar" "caaadr" "caadar" "caaddr" "cadaar" "cadadr" "caddar" "cadddr"
"cdaaar" "cdaadr" "cdadar" "cdaddr" "cddaar" "cddadr" "cdddar" "cddddr"
"set-car!" "set-cdr!"
"pair?" "cons" "car" "cdr" "caar" "cadr" "cdar" "cddr" "caaar" "caadr" "cadar" "caddr" "cdaar"
"cdadr" "cddar" "cdddr" "caaaar" "caaadr" "caadar" "caaddr" "cadaar" "cadadr" "caddar" "cadddr"
"cdaaar" "cdaadr" "cdadar" "cdaddr" "cddaar" "cddadr" "cdddar" "cddddr" "set-car!" "set-cdr!"
; list
"null?" "list?"
"list" "length" "append" "reverse" "list-tail" "list-ref"
"map" "for-each"
"null?" "list?" "list" "length" "append" "reverse" "list-tail" "list-ref" "map" "for-each"
"memq" "memv" "member" "assq" "assv" "assoc"
; symbol
"symbol?" "symbol->string" "string->symbol" "symbol=?"
; char
"char?" "char=?" "char<?" "char>?" "char<=?" "char>=?"
"char-ci=?" "char-ci<?" "char-ci>?" "char-ci<=?" "char-ci>=?"
"char-alphabetic?" "char-numeric?" "char-whitespace?" "char-upper-case?" "char-lower-case?"
"char->integer" "integer->char"
"char-upcase" "char-downcase"
"char?" "char=?" "char<?" "char>?" "char<=?" "char>=?" "char-ci=?" "char-ci<?" "char-ci>?"
"char-ci<=?" "char-ci>=?" "char-alphabetic?" "char-numeric?" "char-whitespace?"
"char-upper-case?" "char-lower-case?" "char->integer" "integer->char" "char-upcase"
"char-downcase"
; string
"string?" "make-string" "string" "string-length" "string-ref" "string-set!"
"string=?" "string-ci=?" "string<?" "string>?" "string<=?" "string>=?"
"string-ci<?" "string-ci>?" "string-ci<=?" "string-ci>=?"
"substring" "string-append" "string->list" "list->string"
"string-for-each"
"string-copy" "string-fill!"
"string-upcase" "string-downcase"
"string?" "make-string" "string" "string-length" "string-ref" "string-set!" "string=?"
"string-ci=?" "string<?" "string>?" "string<=?" "string>=?" "string-ci<?" "string-ci>?"
"string-ci<=?" "string-ci>=?" "substring" "string-append" "string->list" "list->string"
"string-for-each" "string-copy" "string-fill!" "string-upcase" "string-downcase"
; vector
"vector?" "make-vector" "vector" "vector-length" "vector-ref" "vector-set!"
"vector->list" "list->vector" "vector-fill!" "vector-map" "vector-for-each"
"vector?" "make-vector" "vector" "vector-length" "vector-ref" "vector-set!" "vector->list"
"list->vector" "vector-fill!" "vector-map" "vector-for-each"
; bytevector
"bytevector?" "native-endianness"
"make-bytevector" "bytevector-length" "bytevector=?" "bytevector-fill!"
"bytevector-copy!" "bytevector-copy"
"bytevector?" "native-endianness" "make-bytevector" "bytevector-length" "bytevector=?"
"bytevector-fill!" "bytevector-copy!" "bytevector-copy"
; error
"error" "assertion-violation"
; control
"procedure?" "apply" "force"
"call-with-current-continuation" "call/cc"
"values" "call-with-values" "dynamic-wind"
"eval" "scheme-report-environment" "null-environment" "interaction-environment"
"procedure?" "apply" "force" "call-with-current-continuation" "call/cc" "values"
"call-with-values" "dynamic-wind" "eval" "scheme-report-environment" "null-environment"
"interaction-environment"
; IO
"call-with-input-file" "call-with-output-file" "input-port?" "output-port?"
"current-input-port" "current-output-port" "with-input-from-file" "with-output-to-file"
"open-input-file" "open-output-file" "close-input-port" "close-output-port"
"call-with-input-file" "call-with-output-file" "input-port?" "output-port?" "current-input-port"
"current-output-port" "with-input-from-file" "with-output-to-file" "open-input-file"
"open-output-file" "close-input-port" "close-output-port"
; input
"read" "read-char" "peek-char" "eof-object?" "char-ready?"
; output

View file

@ -171,49 +171,35 @@
"."
(_) @function.builtin)
]
; format-ignore
(#any-of? @function.builtin
; General Methods
"assert" "array" "callee" "collectgarbage" "compilestring"
"enabledebughook" "enabledebuginfo" "error" "getconsttable"
"getroottable" "print" "resurrectunreachable" "setconsttable"
"setdebughook" "seterrorhandler" "setroottable" "type"
; Hidden Methods
"_charsize_" "_intsize_" "_floatsize_" "_version_" "_versionnumber_"
; Number Methods
"tofloat" "tostring" "tointeger" "tochar"
; String Methods
"len" "slice" "find" "tolower" "toupper"
; Table Methods
"rawget" "rawset" "rawdelete" "rawin" "clear"
"setdelegate" "getdelegate" "filter" "keys" "values"
; Array Methods
"append" "push" "extend" "pop" "top" "insert" "remove" "resize" "sort"
"reverse" "map" "apply" "reduce"
; Function Methods
"call" "pcall" "acall" "pacall" "setroot" "getroot" "bindenv" "getinfos"
; Class Methods
"instance" "getattributes" "setattributes" "newmember" "rawnewmember"
; Class Instance Methods
"getclass"
; Generator Methods
"getstatus"
; Thread Methods
"call" "wakeup" "wakeupthrow" "getstackinfos"
; Weak Reference Methods
"ref" "weakref"
))
; General Methods
"assert" "array" "callee" "collectgarbage" "compilestring" "enabledebughook" "enabledebuginfo"
"error" "getconsttable" "getroottable" "print" "resurrectunreachable" "setconsttable"
"setdebughook" "seterrorhandler" "setroottable" "type"
; Hidden Methods
"_charsize_" "_intsize_" "_floatsize_" "_version_" "_versionnumber_"
; Number Methods
"tofloat" "tostring" "tointeger" "tochar"
; String Methods
"len" "slice" "find" "tolower" "toupper"
; Table Methods
"rawget" "rawset" "rawdelete" "rawin" "clear" "setdelegate" "getdelegate" "filter" "keys"
"values"
; Array Methods
"append" "push" "extend" "pop" "top" "insert" "remove" "resize" "sort" "reverse" "map" "apply"
"reduce"
; Function Methods
"call" "pcall" "acall" "pacall" "setroot" "getroot" "bindenv" "getinfos"
; Class Methods
"instance" "getattributes" "setattributes" "newmember" "rawnewmember"
; Class Instance Methods
"getclass"
; Generator Methods
"getstatus"
; Thread Methods
"call" "wakeup" "wakeupthrow" "getstackinfos"
; Weak Reference Methods
"ref" "weakref"))
(member_declaration
"constructor" @constructor)

View file

@ -17,11 +17,9 @@
(#lua-match? @constant.builtin "^__[a-zA-Z0-9_]*__$"))
((identifier) @constant.builtin
; format-ignore
(#any-of? @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"))
((attribute
attribute: (identifier) @variable.member)
@ -68,14 +66,14 @@
; Builtin functions
((call
function: (identifier) @function.builtin)
; format-ignore
(#any-of? @function.builtin
"abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" "classmethod"
"compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" "fail" "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"
"struct" "sum" "super" "tuple" "type" "vars" "zip" "__import__"))
"abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr"
"classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec"
"fail" "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" "struct" "sum" "super"
"tuple" "type" "vars" "zip" "__import__"))
; Function definitions
(function_definition
@ -97,23 +95,24 @@
(#eq? @_isinstance "isinstance"))
((identifier) @type.builtin
; format-ignore
(#any-of? @type.builtin
; https://docs.python.org/3/library/exceptions.html
"ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError"
"EOFError" "FloatingPointError" "ModuleNotFoundError" "IndexError" "KeyError"
"KeyboardInterrupt" "MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError"
"ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError"
"SystemError" "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError"
"UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError"
"BlockingIOError" "ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError"
"ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError" "InterruptedError"
"IsADirectoryError" "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning"
"UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning"
"FutureWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning"
"ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError" "EOFError"
"FloatingPointError" "ModuleNotFoundError" "IndexError" "KeyError" "KeyboardInterrupt"
"MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError"
"ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError"
"IndentationError" "TabError" "SystemError" "SystemExit" "TypeError" "UnboundLocalError"
"UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError" "UnicodeTranslateError" "ValueError"
"ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError" "BlockingIOError"
"ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError"
"ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError"
"InterruptedError" "IsADirectoryError" "NotADirectoryError" "PermissionError"
"ProcessLookupError" "TimeoutError" "Warning" "UserWarning" "DeprecationWarning"
"PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning" "FutureWarning" "UnicodeWarning"
"BytesWarning" "ResourceWarning"
; https://docs.python.org/3/library/stdtypes.html
"bool" "int" "float" "complex" "list" "tuple" "range" "str"
"bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type"))
"bool" "int" "float" "complex" "list" "tuple" "range" "str" "bytes" "bytearray" "memoryview"
"set" "frozenset" "dict" "type"))
; Normal parameters
(parameters

View file

@ -38,7 +38,9 @@
((call_expression
function: (identifier) @function.builtin)
(#any-of? @function.builtin "print" "printd" "printdln" "printf" "println" "sprint" "sprintd" "sprintdln" "sprintf" "sprintln"))
(#any-of? @function.builtin
"print" "printd" "printdln" "printf" "println" "sprint" "sprintd" "sprintdln" "sprintf"
"sprintln"))
((identifier) @variable.builtin
(#lua-match? @variable.builtin "^\$+[0-9A-Z_a-z]+\$*$"))

View file

@ -15,17 +15,25 @@
name: (_) @variable.parameter)
((simple_word) @variable.builtin
(#any-of? @variable.builtin "argc" "argv" "argv0" "auto_path" "env" "errorCode" "errorInfo" "tcl_interactive" "tcl_library" "tcl_nonwordchars" "tcl_patchLevel" "tcl_pkgPath" "tcl_platform" "tcl_precision" "tcl_rcFileName" "tcl_traceCompile" "tcl_traceExec" "tcl_wordchars" "tcl_version"))
(#any-of? @variable.builtin
"argc" "argv" "argv0" "auto_path" "env" "errorCode" "errorInfo" "tcl_interactive" "tcl_library"
"tcl_nonwordchars" "tcl_patchLevel" "tcl_pkgPath" "tcl_platform" "tcl_precision"
"tcl_rcFileName" "tcl_traceCompile" "tcl_traceExec" "tcl_wordchars" "tcl_version"))
"expr" @function.builtin
(command
name: (simple_word) @function.builtin
(#any-of? @function.builtin "cd" "exec" "exit" "incr" "info" "join" "puts" "regexp" "regsub" "split" "subst" "trace" "source"))
(#any-of? @function.builtin
"cd" "exec" "exit" "incr" "info" "join" "puts" "regexp" "regsub" "split" "subst" "trace"
"source"))
(command
name: (simple_word) @keyword
(#any-of? @keyword "append" "break" "catch" "continue" "default" "dict" "error" "eval" "global" "lappend" "lassign" "lindex" "linsert" "list" "llength" "lmap" "lrange" "lrepeat" "lreplace" "lreverse" "lsearch" "lset" "lsort" "package" "return" "switch" "throw" "unset" "variable"))
(#any-of? @keyword
"append" "break" "catch" "continue" "default" "dict" "error" "eval" "global" "lappend" "lassign"
"lindex" "linsert" "list" "llength" "lmap" "lrange" "lrepeat" "lreplace" "lreverse" "lsearch"
"lset" "lsort" "package" "return" "switch" "throw" "unset" "variable"))
[
"error"

View file

@ -1,7 +1,9 @@
; Built-ins {{{
((function_call
function: (identifier) @function.builtin)
(#any-of? @function.builtin "chr" "concat" "exit" "flush" "getchar" "not" "ord" "print" "print_err" "print_int" "size" "strcmp" "streq" "substring"))
(#any-of? @function.builtin
"chr" "concat" "exit" "flush" "getchar" "not" "ord" "print" "print_err" "print_int" "size"
"strcmp" "streq" "substring"))
((type_identifier) @type.builtin
(#any-of? @type.builtin "int" "string" "Object"))

View file

@ -123,62 +123,22 @@
"Vec3f" "Vec3f[]"))
((identifier) @keyword
; format-ignore
(#any-of? @keyword
; Reference: https://openusd.org/release/api/sdf_page_front.html
; LIVRPS names
"inherits"
"payload"
"references"
"specializes"
"variantSets"
"variants"
"inherits" "payload" "references" "specializes" "variantSets" "variants"
; assetInfo names
"assetInfo"
"identifier"
"name"
"payloadAssetDependencies"
"version"
"assetInfo" "identifier" "name" "payloadAssetDependencies" "version"
; clips names
"clips"
"active"
"assetPaths"
"manifestAssetPath"
"primPath"
"templateAssetPath"
"templateEndTime"
"templateStartTime"
"templateStride"
"times"
"clips" "active" "assetPaths" "manifestAssetPath" "primPath" "templateAssetPath"
"templateEndTime" "templateStartTime" "templateStride" "times"
; customData names
"customData"
"apiSchemaAutoApplyTo"
"apiSchemaOverridePropertyNames"
"className"
"extraPlugInfo"
"isUsdShadeContainer"
"libraryName"
"providesUsdShadeConnectableAPIBehavior"
"requiresUsdShadeEncapsulation"
"skipCodeGeneration"
"customData" "apiSchemaAutoApplyTo" "apiSchemaOverridePropertyNames" "className" "extraPlugInfo"
"isUsdShadeContainer" "libraryName" "providesUsdShadeConnectableAPIBehavior"
"requiresUsdShadeEncapsulation" "skipCodeGeneration"
; Layer metadata names
"colorConfiguration"
"colorManagementSystem"
"customLayerData"
"defaultPrim"
"doc"
"endTimeCode"
"framesPerSecond"
"owner"
"startTimeCode"
"subLayers"
"colorConfiguration" "colorManagementSystem" "customLayerData" "defaultPrim" "doc" "endTimeCode"
"framesPerSecond" "owner" "startTimeCode" "subLayers"
; Prim metadata
"instanceable"))

View file

@ -164,7 +164,34 @@
name: (reference_expression) @function.call)
((identifier) @function.builtin
(#any-of? @function.builtin "eprint" "eprintln" "error" "exit" "panic" "print" "println" "after" "after_char" "all" "all_after" "all_after_last" "all_before" "all_before_last" "any" "ascii_str" "before" "bool" "byte" "byterune" "bytes" "bytestr" "c_error_number_str" "capitalize" "clear" "clone" "clone_to_depth" "close" "code" "compare" "compare_strings" "contains" "contains_any" "contains_any_substr" "copy" "count" "cstring_to_vstring" "delete" "delete_last" "delete_many" "ends_with" "eprint" "eprintln" "eq_epsilon" "error" "error_with_code" "exit" "f32" "f32_abs" "f32_max" "f32_min" "f64" "f64_max" "fields" "filter" "find_between" "first" "flush_stderr" "flush_stdout" "free" "gc_check_leaks" "get_str_intp_u32_format" "get_str_intp_u64_format" "grow_cap" "grow_len" "hash" "hex" "hex2" "hex_full" "i16" "i64" "i8" "index" "index_after" "index_any" "index_byte" "insert" "int" "is_alnum" "is_bin_digit" "is_capital" "is_digit" "is_hex_digit" "is_letter" "is_lower" "is_oct_digit" "is_space" "is_title" "is_upper" "isnil" "join" "join_lines" "keys" "last" "last_index" "last_index_byte" "length_in_bytes" "limit" "malloc" "malloc_noscan" "map" "match_glob" "memdup" "memdup_noscan" "move" "msg" "panic" "panic_error_number" "panic_lasterr" "panic_optional_not_set" "parse_int" "parse_uint" "pointers" "pop" "prepend" "print" "print_backtrace" "println" "proc_pidpath" "ptr_str" "push_many" "realloc_data" "reduce" "repeat" "repeat_to_depth" "replace" "replace_each" "replace_once" "reverse" "reverse_in_place" "runes" "sort" "sort_by_len" "sort_ignore_case" "sort_with_compare" "split" "split_any" "split_into_lines" "split_nth" "starts_with" "starts_with_capital" "str" "str_escaped" "str_intp" "str_intp_g32" "str_intp_g64" "str_intp_rune" "str_intp_sq" "str_intp_sub" "strg" "string_from_wide" "string_from_wide2" "strip_margin" "strip_margin_custom" "strlong" "strsci" "substr" "substr_ni" "substr_with_check" "title" "to_lower" "to_upper" "to_wide" "tos" "tos2" "tos3" "tos4" "tos5" "tos_clone" "trim" "trim_left" "trim_pr" "try_pop" "try_push" "utf32_decode_to_buffer" "utf32_to_str" "utf32_to_str_no_malloc" "utf8_char_len" "utf8_getchar" "utf8_str_len" "utf8_str_visible_length" "utf8_to_utf32" "v_realloc" "vbytes" "vcalloc" "vcalloc_noscan" "vmemcmp" "vmemcpy" "vmemmove" "vmemset" "vstring" "vstring_literal" "vstring_literal_with_len" "vstring_with_len" "vstrlen" "vstrlen_char" "winapi_lasterr_str"))
(#any-of? @function.builtin
"eprint" "eprintln" "error" "exit" "panic" "print" "println" "after" "after_char" "all"
"all_after" "all_after_last" "all_before" "all_before_last" "any" "ascii_str" "before" "bool"
"byte" "byterune" "bytes" "bytestr" "c_error_number_str" "capitalize" "clear" "clone"
"clone_to_depth" "close" "code" "compare" "compare_strings" "contains" "contains_any"
"contains_any_substr" "copy" "count" "cstring_to_vstring" "delete" "delete_last" "delete_many"
"ends_with" "eprint" "eprintln" "eq_epsilon" "error" "error_with_code" "exit" "f32" "f32_abs"
"f32_max" "f32_min" "f64" "f64_max" "fields" "filter" "find_between" "first" "flush_stderr"
"flush_stdout" "free" "gc_check_leaks" "get_str_intp_u32_format" "get_str_intp_u64_format"
"grow_cap" "grow_len" "hash" "hex" "hex2" "hex_full" "i16" "i64" "i8" "index" "index_after"
"index_any" "index_byte" "insert" "int" "is_alnum" "is_bin_digit" "is_capital" "is_digit"
"is_hex_digit" "is_letter" "is_lower" "is_oct_digit" "is_space" "is_title" "is_upper" "isnil"
"join" "join_lines" "keys" "last" "last_index" "last_index_byte" "length_in_bytes" "limit"
"malloc" "malloc_noscan" "map" "match_glob" "memdup" "memdup_noscan" "move" "msg" "panic"
"panic_error_number" "panic_lasterr" "panic_optional_not_set" "parse_int" "parse_uint"
"pointers" "pop" "prepend" "print" "print_backtrace" "println" "proc_pidpath" "ptr_str"
"push_many" "realloc_data" "reduce" "repeat" "repeat_to_depth" "replace" "replace_each"
"replace_once" "reverse" "reverse_in_place" "runes" "sort" "sort_by_len" "sort_ignore_case"
"sort_with_compare" "split" "split_any" "split_into_lines" "split_nth" "starts_with"
"starts_with_capital" "str" "str_escaped" "str_intp" "str_intp_g32" "str_intp_g64"
"str_intp_rune" "str_intp_sq" "str_intp_sub" "strg" "string_from_wide" "string_from_wide2"
"strip_margin" "strip_margin_custom" "strlong" "strsci" "substr" "substr_ni" "substr_with_check"
"title" "to_lower" "to_upper" "to_wide" "tos" "tos2" "tos3" "tos4" "tos5" "tos_clone" "trim"
"trim_left" "trim_pr" "try_pop" "try_push" "utf32_decode_to_buffer" "utf32_to_str"
"utf32_to_str_no_malloc" "utf8_char_len" "utf8_getchar" "utf8_str_len" "utf8_str_visible_length"
"utf8_to_utf32" "v_realloc" "vbytes" "vcalloc" "vcalloc_noscan" "vmemcmp" "vmemcpy" "vmemmove"
"vmemset" "vstring" "vstring_literal" "vstring_literal_with_len" "vstring_with_len" "vstrlen"
"vstrlen_char" "winapi_lasterr_str"))
; Operators
[

View file

@ -35,7 +35,9 @@
((set_item
option: (option_name) @_option
value: (set_value) @injection.content)
(#any-of? @_option "includeexpr" "inex" "printexpr" "pexpr" "formatexpr" "fex" "indentexpr" "inde" "foldtext" "fdt" "foldexpr" "fde" "diffexpr" "dex" "patchexpr" "pex" "charconvert" "ccv")
(#any-of? @_option
"includeexpr" "inex" "printexpr" "pexpr" "formatexpr" "fex" "indentexpr" "inde" "foldtext" "fdt"
"foldexpr" "fde" "diffexpr" "dex" "patchexpr" "pex" "charconvert" "ccv")
(#set! injection.language "vim"))
((comment) @injection.content

View file

@ -13,7 +13,8 @@
(list
.
(symbol) @keyword
(#any-of? @keyword "defwindow" "defwidget" "defvar" "defpoll" "deflisten" "geometry" "children" "struts"))
(#any-of? @keyword
"defwindow" "defwidget" "defvar" "defpoll" "deflisten" "geometry" "children" "struts"))
; Loop
(loop_widget
@ -38,7 +39,10 @@
(list
.
(symbol) @tag.builtin
(#any-of? @tag.builtin "box" "button" "calendar" "centerbox" "checkbox" "circular-progress" "color-button" "color-chooser" "combo-box-text" "eventbox" "expander" "graph" "image" "input" "label" "literal" "overlay" "progress" "revealer" "scale" "scroll" "transform"))
(#any-of? @tag.builtin
"box" "button" "calendar" "centerbox" "checkbox" "circular-progress" "color-button"
"color-chooser" "combo-box-text" "eventbox" "expander" "graph" "image" "input" "label" "literal"
"overlay" "progress" "revealer" "scale" "scroll" "transform"))
; Variables
(ident) @variable
@ -47,7 +51,9 @@
(symbol) @variable)
((ident) @variable.builtin
(#any-of? @variable.builtin "EWW_TEMPS" "EWW_RAM" "EWW_DISK" "EWW_BATTERY" "EWW_CPU" "EWW_NET" "EWW_TIME" "EWW_CONFIG_DIR" "EWW_CMD" "EWW_EXECUTABLE"))
(#any-of? @variable.builtin
"EWW_TEMPS" "EWW_RAM" "EWW_DISK" "EWW_BATTERY" "EWW_CPU" "EWW_NET" "EWW_TIME" "EWW_CONFIG_DIR"
"EWW_CMD" "EWW_EXECUTABLE"))
; Properties
(keyword) @property

View file

@ -34,6 +34,7 @@ end)
--- Control the indent here. Change to \t if uses tab instead
local indent_str = " "
local textwidth = 100
-- Query to control the formatter
local format_queries = [[
@ -174,8 +175,8 @@ local format_queries = [[
[
"_"
name: (identifier)
]
(_) @format.cancel-append
(_)
] @format.cancel-append
.
")"
(#not-has-type? @format.cancel-append comment))
@ -254,9 +255,26 @@ local format_queries = [[
.
(capture))
; Separate this query to avoid capture duplication
(predicate
"(" @format.indent.begin @format.cancel-append)
(predicate
(parameters
(_) @format.prepend-space))
(comment) @format.prepend-newline
.
(_) @format.cancel-prepend)
(#is-start-of-line? @format.prepend-newline))
(predicate
(parameters
(_) @format.prepend-space)
(#set! conditional-newline))
(predicate
(parameters
.
(capture)
. (_) @format.prepend-space)
(#set! lookahead-newline)
(#set! conditional-newline))
;; Workaround to keep the string's content
(string) @format.keep
@ -322,7 +340,24 @@ local function iter(bufnr, node, lines, q, level)
if q["format.prepend-newline"][id] then
lines[#lines + 1] = string.rep(indent_str, level)
elseif q["format.prepend-space"][id] then
lines[#lines] = lines[#lines] .. " "
if not q["format.prepend-space"][id]["conditional-newline"] then
lines[#lines] = lines[#lines] .. " "
elseif child:byte_length() + 1 + #lines[#lines] > textwidth then
lines[#lines + 1] = string.rep(indent_str, level)
else
-- Do a rough guess of the actual byte length. If it's larger than `columns` then add a newline first
-- column - byte_end + byte_start
local _, _, byte_start = child:start()
local _, _, byte_end = node:end_()
if
q["format.prepend-space"][id]["lookahead-newline"]
and textwidth - (byte_end - byte_start) - #lines[#lines] < 0
then
lines[#lines + 1] = string.rep(indent_str, level)
else
lines[#lines] = lines[#lines] .. " "
end
end
end
end
if q["format.replace"][id] then