mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(bash): highlight variable argument for printf -v
This commit is contained in:
parent
c78594ce06
commit
652831b231
1 changed files with 11 additions and 0 deletions
|
|
@ -247,6 +247,17 @@
|
|||
"READLINE_ARGUMENT" "READLINE_LINE" "READLINE_MARK" "READLINE_POINT" "REPLY" "SECONDS" "SHELL"
|
||||
"SHELLOPTS" "SHLVL" "SRANDOM" "TIMEFORMAT" "TMOUT" "TMPDIR" "UID"))
|
||||
|
||||
((command
|
||||
name: (command_name
|
||||
(word) @_printf)
|
||||
.
|
||||
argument: (word) @_v
|
||||
.
|
||||
argument: (word) @variable)
|
||||
(#eq? @_printf "printf")
|
||||
(#eq? @_v "-v")
|
||||
(#lua-match? @variable "^[a-zA-Z_][a-zA-Z0-9_]*$"))
|
||||
|
||||
(case_item
|
||||
value: (word) @variable.parameter)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue