mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(just): improve attribute highlights
- Default attribute highlight - Highlight more builtin attributes - Highlight special attribute arguments
This commit is contained in:
parent
36c78ee572
commit
9fcb3f7aa2
1 changed files with 21 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue