diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-08-25 19:19:32 +0200 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-08-26 10:32:32 +0200 |
| commit | 85ec015f3be42a3c2c04648ff99d617d9609e5f0 (patch) | |
| tree | 8028fbce93b04655dbefc7ab4195af685010fe28 | |
| parent | feat(gotmpl,helm)!: update parser and queries (diff) | |
| download | nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.tar nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.tar.gz nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.tar.bz2 nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.tar.lz nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.tar.xz nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.tar.zst nvim-treesitter-85ec015f3be42a3c2c04648ff99d617d9609e5f0.zip | |
feat(nu)!: update parser and queries
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 2 | ||||
| -rw-r--r-- | runtime/queries/nu/highlights.scm | 52 |
2 files changed, 22 insertions, 32 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index cae9df413..ffa103213 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1479,7 +1479,7 @@ return { }, nu = { install_info = { - revision = '6544c4383643cf8608d50def2247a7af8314e148', + revision = 'cc4624fbc6ec3563d98fbe8f215a8b8e10b16f32', url = 'https://github.com/nushell/tree-sitter-nu', }, maintainers = { '@abhisheksingh0x558' }, diff --git a/runtime/queries/nu/highlights.scm b/runtime/queries/nu/highlights.scm index f8342fab4..fc73d3483 100644 --- a/runtime/queries/nu/highlights.scm +++ b/runtime/queries/nu/highlights.scm @@ -2,13 +2,8 @@ ; keywords [ "let" - "let-env" "mut" "const" - "hide-env" - "source" - "source-env" - "overlay" ] @keyword [ @@ -20,16 +15,9 @@ [ "loop" "while" - "break" - "continue" ] @keyword.repeat -[ - "def" - "do" -] @keyword.function - -"return" @keyword.return +"def" @keyword.function [ "try" @@ -49,9 +37,6 @@ "extern" ] @keyword.modifier -(hide_mod - "hide" @keyword) - (decl_use module: (unquoted) @module) @@ -59,21 +44,6 @@ "for" @keyword "in" @keyword) -(overlay_list - "list" @keyword.import) - -(overlay_hide - "hide" @keyword.import) - -(overlay_new - "new" @keyword.import) - -(overlay_use - "as" @keyword) - -(ctrl_error - "make" @keyword.import) - ; --- ; literals (val_number) @number @@ -317,6 +287,26 @@ key: (identifier) @property ]) (command + head: (cmd_identifier) @keyword + (#any-of? @keyword "do" "source" "source-env" "hide" "hide-env")) + +(command + head: (cmd_identifier) @keyword.repeat + (#any-of? @keyword.repeat "break" "continue" "return")) + +(command + head: (cmd_identifier) @keyword + . + arg_str: (val_string) @keyword.import + (#any-of? @keyword "overlay" "error")) + +(command + head: (cmd_identifier) @_cmd + arg_str: (val_string) @keyword + (#eq? @_cmd "overlay") + (#eq? @keyword "as")) + +(command "^" @punctuation.delimiter head: (_) @function) |
