aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorzc he <blindfs19@gmail.com>2025-10-25 17:14:38 +0800
committerGitHub <noreply@github.com>2025-10-25 11:14:38 +0200
commit9ee023538e072163cc541f29bc74214f7b0b90f6 (patch)
treef25fcd3f99ced17835af081c3dbe33c305453a82 /runtime
parentfeat(hyprlang): update parser and queries (#8224) (diff)
downloadnvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.tar
nvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.tar.gz
nvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.tar.bz2
nvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.tar.lz
nvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.tar.xz
nvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.tar.zst
nvim-treesitter-9ee023538e072163cc541f29bc74214f7b0b90f6.zip
feat(nu): update syntax to Nu 0.108.0 (#8227)
also deduplicate bracket rules
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/nu/highlights.scm43
1 files changed, 19 insertions, 24 deletions
diff --git a/runtime/queries/nu/highlights.scm b/runtime/queries/nu/highlights.scm
index e008352d4..2991ef970 100644
--- a/runtime/queries/nu/highlights.scm
+++ b/runtime/queries/nu/highlights.scm
@@ -219,6 +219,8 @@ file_path: (val_string) @variable.parameter
"}"
"["
"]"
+ "<"
+ ">"
"...["
"...("
"...{"
@@ -258,9 +260,9 @@ key: (identifier) @property
(cmd_identifier) @function
-; generated with Nu 0.93.0
+; generated with Nu 0.108.0
; > help commands
-; | filter { $in.command_type == builtin and $in.category != core }
+; | where $it.command_type == built-in and $it.category != core
; | each {$'"($in.name | split row " " | $in.0)"'}
; | uniq
; | str join ' '
@@ -268,20 +270,19 @@ key: (identifier) @property
head: [
(cmd_identifier) @function.builtin
(#any-of? @function.builtin
- "all" "ansi" "any" "append" "ast" "bits" "bytes" "cal" "cd" "char" "clear" "collect" "columns"
- "compact" "complete" "config" "cp" "date" "debug" "decode" "default" "detect" "dfr" "drop"
- "du" "each" "encode" "enumerate" "every" "exec" "exit" "explain" "explore" "export-env" "fill"
- "filter" "find" "first" "flatten" "fmt" "format" "from" "generate" "get" "glob" "grid" "group"
+ "all" "ansi" "any" "append" "ast" "bits" "bytes" "cal" "cd" "char" "chunk-by" "chunks" "clear"
+ "collect" "columns" "compact" "complete" "config" "cp" "date" "debug" "decode" "default"
+ "detect" "drop" "du" "each" "encode" "enumerate" "every" "exec" "exit" "explain" "explore"
+ "fill" "filter" "find" "first" "flatten" "format" "from" "generate" "get" "glob" "grid"
"group-by" "hash" "headers" "histogram" "history" "http" "input" "insert" "inspect"
- "interleave" "into" "is-empty" "is-not-empty" "is-terminal" "items" "join" "keybindings"
+ "interleave" "into" "is-empty" "is-not-empty" "is-terminal" "items" "job" "join" "keybindings"
"kill" "last" "length" "let-env" "lines" "load-env" "ls" "math" "merge" "metadata" "mkdir"
"mktemp" "move" "mv" "nu-check" "nu-highlight" "open" "panic" "par-each" "parse" "path"
- "plugin" "port" "prepend" "print" "ps" "query" "random" "range" "reduce" "reject" "rename"
- "reverse" "rm" "roll" "rotate" "run-external" "save" "schema" "select" "seq" "shuffle" "skip"
- "sleep" "sort" "sort-by" "split" "split-by" "start" "stor" "str" "sys" "table" "take" "tee"
- "term" "timeit" "to" "touch" "transpose" "tutor" "ulimit" "uname" "uniq" "uniq-by" "update"
- "upsert" "url" "values" "view" "watch" "where" "which" "whoami" "window" "with-env" "wrap"
- "zip")
+ "plugin" "port" "prepend" "print" "ps" "query" "random" "reduce" "reject" "rename" "reverse"
+ "rm" "roll" "rotate" "run-external" "save" "schema" "select" "seq" "shuffle" "skip" "sleep"
+ "slice" "sort" "sort-by" "split" "start" "stor" "str" "sys" "table" "take" "tee" "term"
+ "timeit" "to" "touch" "transpose" "tutor" "ulimit" "uname" "uniq" "uniq-by" "update" "upsert"
+ "url" "values" "version" "view" "watch" "which" "whoami" "window" "with-env" "wrap" "zip")
])
(command
@@ -314,6 +315,7 @@ key: (identifier) @property
[
"."
"?"
+ "!"
] @punctuation.delimiter) @variable.parameter
(stmt_let
@@ -334,11 +336,7 @@ key: (identifier) @property
(flat_type) @type
(list_type
- "list" @type.builtin
- [
- "<"
- ">"
- ] @punctuation.bracket)
+ "list" @type.builtin)
(collection_type
[
@@ -350,14 +348,11 @@ key: (identifier) @property
key: (_) @variable.parameter)
(collection_type
- [
- "<"
- ">"
- ] @punctuation.bracket)
-
-(collection_type
":" @punctuation.special)
+(composite_type
+ "oneof" @type.builtin)
+
(shebang) @keyword.directive
(comment) @comment @spell