Update generated neovim config
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
[
|
||||
(list)
|
||||
(scope)
|
||||
(cons)
|
||||
] @fold
|
||||
@ -0,0 +1,131 @@
|
||||
;; Includes
|
||||
|
||||
((symbol) @keyword.control.import
|
||||
(#match? @keyword.control.import "^(use|import|load)$"))
|
||||
|
||||
;; Keywords
|
||||
|
||||
((symbol) @keyword
|
||||
(#match? @keyword "^(do|doc)$"))
|
||||
|
||||
; Keywords construct a symbol
|
||||
|
||||
(keyword) @string.special.symbol
|
||||
|
||||
;; Operators
|
||||
|
||||
; TODO: classify
|
||||
((symbol) @operator (#match? @operator "^(&|\\*|\\+|-|<|<=|=|>|>=)$"))
|
||||
|
||||
;; Defining
|
||||
|
||||
((list
|
||||
. (symbol) @label
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
(#match? @label "^(def|defop|defn)$"))
|
||||
|
||||
((cons
|
||||
. (symbol) @label
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
(#match? @label "^(def|defop|defn)$"))
|
||||
|
||||
((symbol) @label
|
||||
(#match? @label "^(def|defop|defn)$"))
|
||||
|
||||
;; Builtins
|
||||
|
||||
((symbol) @function.builtin
|
||||
(#match? @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-cmd|with-args|with-entrypoint|with-default-args|with-entrypoint-args|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\\?|write|publish|export|only-globs|except-globs|recall-memo|store-memo|mask|list|list\\*|first|rest|length|second|third|map|map-pairs|foldr|foldl|concat|append|filter|conj|list->scope|merge|apply|id|always|vals|keys|memo|succeeds\\?|run|last|take|collect|take-all|insecure!|from|cd|wrap-cmd|docker-build|oci-load|mkfile|path-base|not)$"))
|
||||
|
||||
((symbol) @function.macro
|
||||
(#match? @function.macro "^(op|fn|current-scope|quote|let|provide|module|or|and|->|curryfn|assert|refute|for|\\$|\\$\\$|linux|glob)$"))
|
||||
|
||||
;; Conditionals
|
||||
|
||||
((symbol) @keyword.control.conditional
|
||||
(#match? @keyword.control.conditional "^(if|case|cond|when)$"))
|
||||
|
||||
;; Repeats
|
||||
|
||||
((symbol) @keyword.control.repeat
|
||||
(#match? @keyword.control.repeat "^(each)$"))
|
||||
|
||||
;; Special forms
|
||||
|
||||
; (-> x y z) highlights first x as var, y z as function
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(symbol) @variable.parameter
|
||||
(symbol) @function)
|
||||
|
||||
; (-> 42 x y) highlights 42 as regular number
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(_)
|
||||
(symbol) @function)
|
||||
|
||||
;; Functions
|
||||
|
||||
(list
|
||||
. (symbol) @function)
|
||||
|
||||
;; Variables
|
||||
|
||||
(list (symbol) @variable)
|
||||
|
||||
(cons (symbol) @variable)
|
||||
|
||||
(scope (symbol) @variable)
|
||||
|
||||
(symbind (symbol) @variable)
|
||||
|
||||
;; Namespaces
|
||||
|
||||
(symbind
|
||||
(symbol) @namespace
|
||||
. (keyword))
|
||||
|
||||
;; Punctuation
|
||||
|
||||
[ "(" ")" ] @punctuation.bracket
|
||||
|
||||
[ "{" "}" ] @punctuation.bracket
|
||||
|
||||
[ "[" "]" ] @punctuation.bracket
|
||||
|
||||
((symbol) @punctuation.delimiter
|
||||
(#eq? @punctuation.delimiter "->"))
|
||||
|
||||
;; Literals
|
||||
|
||||
(string) @string
|
||||
|
||||
(escape_sequence) @constant.character.escape
|
||||
|
||||
(path) @string.special.path
|
||||
(command) @string.special.path
|
||||
|
||||
(number) @constant.numeric.integer
|
||||
|
||||
(boolean) @constant.builtin.boolean
|
||||
|
||||
[
|
||||
(ignore)
|
||||
(null)
|
||||
] @constant.builtin
|
||||
|
||||
[
|
||||
"^"
|
||||
] @character.special
|
||||
|
||||
;; Comments
|
||||
|
||||
(comment) @comment.line @spell
|
||||
@ -0,0 +1,131 @@
|
||||
;; Includes
|
||||
|
||||
((symbol) @keyword.control.import
|
||||
{{match "@keyword.control.import" "Import"}})
|
||||
|
||||
;; Keywords
|
||||
|
||||
((symbol) @keyword
|
||||
{{match "@keyword" "Special"}})
|
||||
|
||||
; Keywords construct a symbol
|
||||
|
||||
(keyword) @string.special.symbol
|
||||
|
||||
;; Operators
|
||||
|
||||
; TODO: classify
|
||||
((symbol) @operator (#match? @operator "^(&|\\*|\\+|-|<|<=|=|>|>=)$"))
|
||||
|
||||
;; Defining
|
||||
|
||||
((list
|
||||
. (symbol) @label
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
{{match "@label" "Def"}})
|
||||
|
||||
((cons
|
||||
. (symbol) @label
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
{{match "@label" "Def"}})
|
||||
|
||||
((symbol) @label
|
||||
{{match "@label" "Def"}})
|
||||
|
||||
;; Builtins
|
||||
|
||||
((symbol) @function.builtin
|
||||
{{match "@function.builtin" "Fn"}})
|
||||
|
||||
((symbol) @function.macro
|
||||
{{match "@function.macro" "Op"}})
|
||||
|
||||
;; Conditionals
|
||||
|
||||
((symbol) @keyword.control.conditional
|
||||
{{match "@keyword.control.conditional" "Cond"}})
|
||||
|
||||
;; Repeats
|
||||
|
||||
((symbol) @keyword.control.repeat
|
||||
{{match "@keyword.control.repeat" "Repeat"}})
|
||||
|
||||
;; Special forms
|
||||
|
||||
; (-> x y z) highlights first x as var, y z as function
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(symbol) @variable.parameter
|
||||
(symbol) @function)
|
||||
|
||||
; (-> 42 x y) highlights 42 as regular number
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(_)
|
||||
(symbol) @function)
|
||||
|
||||
;; Functions
|
||||
|
||||
(list
|
||||
. (symbol) @function)
|
||||
|
||||
;; Variables
|
||||
|
||||
(list (symbol) @variable)
|
||||
|
||||
(cons (symbol) @variable)
|
||||
|
||||
(scope (symbol) @variable)
|
||||
|
||||
(symbind (symbol) @variable)
|
||||
|
||||
;; Namespaces
|
||||
|
||||
(symbind
|
||||
(symbol) @namespace
|
||||
. (keyword))
|
||||
|
||||
;; Punctuation
|
||||
|
||||
[ "(" ")" ] @punctuation.bracket
|
||||
|
||||
[ "{" "}" ] @punctuation.bracket
|
||||
|
||||
[ "[" "]" ] @punctuation.bracket
|
||||
|
||||
((symbol) @punctuation.delimiter
|
||||
(#eq? @punctuation.delimiter "->"))
|
||||
|
||||
;; Literals
|
||||
|
||||
(string) @string
|
||||
|
||||
(escape_sequence) @constant.character.escape
|
||||
|
||||
(path) @string.special.path
|
||||
(command) @string.special.path
|
||||
|
||||
(number) @constant.numeric.integer
|
||||
|
||||
(boolean) @constant.builtin.boolean
|
||||
|
||||
[
|
||||
(ignore)
|
||||
(null)
|
||||
] @constant.builtin
|
||||
|
||||
[
|
||||
"^"
|
||||
] @character.special
|
||||
|
||||
;; Comments
|
||||
|
||||
(comment) @comment.line @spell
|
||||
@ -0,0 +1,22 @@
|
||||
[
|
||||
(list)
|
||||
(scope)
|
||||
(cons)
|
||||
] @indent
|
||||
|
||||
[
|
||||
")"
|
||||
"}"
|
||||
"]"
|
||||
] @indent_end
|
||||
|
||||
[ "(" ")" ] @branch
|
||||
|
||||
[ "{" "}" ] @branch
|
||||
|
||||
[ "[" "]" ] @branch
|
||||
|
||||
[
|
||||
(ERROR)
|
||||
(comment)
|
||||
] @auto
|
||||
@ -0,0 +1 @@
|
||||
(comment) @comment
|
||||
@ -0,0 +1,18 @@
|
||||
; Scopes
|
||||
|
||||
[
|
||||
(list)
|
||||
(scope)
|
||||
] @scope
|
||||
|
||||
; References
|
||||
|
||||
(symbol) @reference
|
||||
|
||||
; Definitions
|
||||
|
||||
((list
|
||||
. (symbol) @_fnkw
|
||||
. (symbol) @definition.function
|
||||
(symbol)? @definition.parameter)
|
||||
(#match? @_fnkw "^(def|defop|defn)$"))
|
||||
@ -0,0 +1,18 @@
|
||||
; Scopes
|
||||
|
||||
[
|
||||
(list)
|
||||
(scope)
|
||||
] @scope
|
||||
|
||||
; References
|
||||
|
||||
(symbol) @reference
|
||||
|
||||
; Definitions
|
||||
|
||||
((list
|
||||
. (symbol) @_fnkw
|
||||
. (symbol) @definition.function
|
||||
(symbol)? @definition.parameter)
|
||||
{{match "@_fnkw" "Def"}})
|
||||
@ -0,0 +1,131 @@
|
||||
;; Variables
|
||||
|
||||
(list (symbol) @variable)
|
||||
|
||||
(cons (symbol) @variable)
|
||||
|
||||
(scope (symbol) @variable)
|
||||
|
||||
(symbind (symbol) @variable)
|
||||
|
||||
;; Functions
|
||||
|
||||
(list
|
||||
. (symbol) @function)
|
||||
|
||||
; Keywords construct a symbol
|
||||
|
||||
(keyword) @constructor
|
||||
|
||||
;; Namespaces
|
||||
|
||||
(symbind
|
||||
(symbol) @namespace
|
||||
. (keyword))
|
||||
|
||||
;; Includes
|
||||
|
||||
((symbol) @include
|
||||
(#any-of? @include "use" "import" "load"))
|
||||
|
||||
;; Keywords
|
||||
|
||||
((symbol) @keyword
|
||||
(#any-of? @keyword "do" "doc"))
|
||||
|
||||
;; Defining
|
||||
|
||||
((list
|
||||
. (symbol) @keyword.function
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
(#any-of? @keyword.function "def" "defop" "defn"))
|
||||
|
||||
((cons
|
||||
. (symbol) @keyword.function
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
(#any-of? @keyword.function "def" "defop" "defn"))
|
||||
|
||||
((symbol) @keyword.function
|
||||
(#any-of? @keyword.function "def" "defop" "defn"))
|
||||
|
||||
;; Builtins
|
||||
|
||||
((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-cmd" "with-args" "with-entrypoint" "with-default-args" "with-entrypoint-args" "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?" "write" "publish" "export" "only-globs" "except-globs" "recall-memo" "store-memo" "mask" "list" "list*" "first" "rest" "length" "second" "third" "map" "map-pairs" "foldr" "foldl" "concat" "append" "filter" "conj" "list->scope" "merge" "apply" "id" "always" "vals" "keys" "memo" "succeeds?" "run" "last" "take" "collect" "take-all" "insecure!" "from" "cd" "wrap-cmd" "docker-build" "oci-load" "mkfile" "path-base" "not"))
|
||||
|
||||
((symbol) @function.macro
|
||||
(#any-of? @function.macro "op" "fn" "current-scope" "quote" "let" "provide" "module" "or" "and" "->" "curryfn" "assert" "refute" "for" "$" "$$" "linux" "glob"))
|
||||
|
||||
;; Conditionals
|
||||
|
||||
((symbol) @conditional
|
||||
(#any-of? @conditional "if" "case" "cond" "when"))
|
||||
|
||||
;; Repeats
|
||||
|
||||
((symbol) @repeat
|
||||
(#any-of? @repeat "each"))
|
||||
|
||||
;; Operators
|
||||
|
||||
; TODO: classify
|
||||
((symbol) @operator (#any-of? @operator "&" "*" "+" "-" "<" "<=" "=" ">" ">="))
|
||||
|
||||
;; Special forms
|
||||
|
||||
; (-> 42 x y) highlights 42 as its default highlight
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(_)
|
||||
(symbol) @function)
|
||||
|
||||
; (-> x y z) highlights first x as var, y z as function
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(symbol) @variable.parameter
|
||||
(symbol) @function)
|
||||
|
||||
;; Punctuation
|
||||
|
||||
[ "(" ")" ] @punctuation.bracket
|
||||
|
||||
[ "{" "}" ] @punctuation.bracket
|
||||
|
||||
[ "[" "]" ] @punctuation.bracket
|
||||
|
||||
((symbol) @punctuation.delimiter
|
||||
(#eq? @punctuation.delimiter "->"))
|
||||
|
||||
;; Literals
|
||||
|
||||
(string) @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(path) @text.uri @string.special
|
||||
(command) @string.special
|
||||
|
||||
(number) @number
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
[
|
||||
(ignore)
|
||||
(null)
|
||||
] @constant.builtin
|
||||
|
||||
[
|
||||
"^"
|
||||
] @character.special
|
||||
|
||||
;; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
@ -0,0 +1,131 @@
|
||||
;; Variables
|
||||
|
||||
(list (symbol) @variable)
|
||||
|
||||
(cons (symbol) @variable)
|
||||
|
||||
(scope (symbol) @variable)
|
||||
|
||||
(symbind (symbol) @variable)
|
||||
|
||||
;; Functions
|
||||
|
||||
(list
|
||||
. (symbol) @function)
|
||||
|
||||
; Keywords construct a symbol
|
||||
|
||||
(keyword) @constructor
|
||||
|
||||
;; Namespaces
|
||||
|
||||
(symbind
|
||||
(symbol) @namespace
|
||||
. (keyword))
|
||||
|
||||
;; Includes
|
||||
|
||||
((symbol) @include
|
||||
{{match "@include" "Import"}})
|
||||
|
||||
;; Keywords
|
||||
|
||||
((symbol) @keyword
|
||||
{{match "@keyword" "Special"}})
|
||||
|
||||
;; Defining
|
||||
|
||||
((list
|
||||
. (symbol) @keyword.function
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
{{match "@keyword.function" "Def"}})
|
||||
|
||||
((cons
|
||||
. (symbol) @keyword.function
|
||||
. (symbol) @function
|
||||
(symbol)? @parameter)
|
||||
{{match "@keyword.function" "Def"}})
|
||||
|
||||
((symbol) @keyword.function
|
||||
{{match "@keyword.function" "Def"}})
|
||||
|
||||
;; Builtins
|
||||
|
||||
((symbol) @function.builtin
|
||||
{{match "@function.builtin" "Fn"}})
|
||||
|
||||
((symbol) @function.macro
|
||||
{{match "@function.macro" "Op"}})
|
||||
|
||||
;; Conditionals
|
||||
|
||||
((symbol) @conditional
|
||||
{{match "@conditional" "Cond"}})
|
||||
|
||||
;; Repeats
|
||||
|
||||
((symbol) @repeat
|
||||
{{match "@repeat" "Repeat"}})
|
||||
|
||||
;; Operators
|
||||
|
||||
; TODO: classify
|
||||
((symbol) @operator (#any-of? @operator "&" "*" "+" "-" "<" "<=" "=" ">" ">="))
|
||||
|
||||
;; Special forms
|
||||
|
||||
; (-> 42 x y) highlights 42 as its default highlight
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(_)
|
||||
(symbol) @function)
|
||||
|
||||
; (-> x y z) highlights first x as var, y z as function
|
||||
(list
|
||||
.
|
||||
(symbol) @function.macro
|
||||
(#eq? @function.macro "->")
|
||||
.
|
||||
(symbol) @variable.parameter
|
||||
(symbol) @function)
|
||||
|
||||
;; Punctuation
|
||||
|
||||
[ "(" ")" ] @punctuation.bracket
|
||||
|
||||
[ "{" "}" ] @punctuation.bracket
|
||||
|
||||
[ "[" "]" ] @punctuation.bracket
|
||||
|
||||
((symbol) @punctuation.delimiter
|
||||
(#eq? @punctuation.delimiter "->"))
|
||||
|
||||
;; Literals
|
||||
|
||||
(string) @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(path) @text.uri @string.special
|
||||
(command) @string.special
|
||||
|
||||
(number) @number
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
[
|
||||
(ignore)
|
||||
(null)
|
||||
] @constant.builtin
|
||||
|
||||
[
|
||||
"^"
|
||||
] @character.special
|
||||
|
||||
;; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
@ -0,0 +1,18 @@
|
||||
; Scopes
|
||||
|
||||
[
|
||||
(list)
|
||||
(scope)
|
||||
] @scope
|
||||
|
||||
; References
|
||||
|
||||
(symbol) @reference
|
||||
|
||||
; Definitions
|
||||
|
||||
((list
|
||||
. (symbol) @_fnkw
|
||||
. (symbol) @definition.function
|
||||
(symbol)? @definition.parameter)
|
||||
(#any-of? @_fnkw "def" "defop" "defn"))
|
||||
Reference in New Issue
Block a user