diff options
| author | Omar Valdez <omarantoniovaldezf2@gmail.com> | 2025-02-25 01:31:50 -0800 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-02-25 10:47:31 +0100 |
| commit | 9fcb3f7aa2504307eaaebcc600ed2063d681f80e (patch) | |
| tree | 54557493ee0984307404d3fe9ffb35acf62cfc99 /queries | |
| parent | bot(lockfile): update styled (diff) | |
| download | nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.tar nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.tar.gz nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.tar.bz2 nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.tar.lz nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.tar.xz nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.tar.zst nvim-treesitter-9fcb3f7aa2504307eaaebcc600ed2063d681f80e.zip | |
feat(just): improve attribute highlights
- Default attribute highlight
- Highlight more builtin attributes
- Highlight special attribute arguments
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/just/highlights.scm | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/queries/just/highlights.scm b/queries/just/highlights.scm index b15a8574a..fbbf4eece 100644 --- a/queries/just/highlights.scm +++ b/queries/just/highlights.scm @@ -111,13 +111,29 @@ "allow-duplicate-recipes" "dotenv-filename" "dotenv-load" "dotenv-path" "export" "fallback" "ignore-comments" "positional-arguments" "tempdir" "windows-powershell" "windows-shell")) -; Ref: https://just.systems/man/en/chapter_32.html -;(recipe (attribute (identifier) @error)) (recipe (attribute - (identifier) @attribute) - (#any-of? @attribute - "confirm" "linux" "macos" "no-cd" "no-exit-message" "no-quiet" "private" "unix" "windows")) + (identifier) @attribute)) + +; https://just.systems/man/en/attributes.html +((recipe + (attribute + (identifier) @attribute.builtin)) + (#any-of? @attribute.builtin + "confirm" "doc" "extension" "group" "linux" "macos" "no-cd" "no-exit-message" "no-quiet" + "openbsd" "positional-arguments" "private" "script" "unix" "windows" "working-directory")) + +((recipe + (attribute + (identifier) @_doc + argument: (string) @string.documentation)) + (#eq? @_doc "doc")) + +((recipe + (attribute + (identifier) @_dir + argument: (string) @string.special.path)) + (#eq? @_dir "working-directory")) ; Ref: https://just.systems/man/en/chapter_31.html ;(function_call (identifier) @error) |
