mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
highlights(nix): highlight parameters
This commit is contained in:
parent
18cc1216e1
commit
770066ba01
1 changed files with 7 additions and 2 deletions
|
|
@ -49,13 +49,18 @@
|
||||||
|
|
||||||
; `?` in `{ x ? y }:`, used to set defaults for named function arguments
|
; `?` in `{ x ? y }:`, used to set defaults for named function arguments
|
||||||
; I'm not really sure what group this should go in, but it should probably have highlighting, so I'm putting it in @punctuation.special
|
; I'm not really sure what group this should go in, but it should probably have highlighting, so I'm putting it in @punctuation.special
|
||||||
(formal "?" @punctuation.special)
|
(formal
|
||||||
|
name: (identifier) @parameter
|
||||||
|
"?"? @punctuation.special)
|
||||||
|
|
||||||
; `...` in `{ ... }`, used to ignore unknown named function arguments (see above)
|
; `...` in `{ ... }`, used to ignore unknown named function arguments (see above)
|
||||||
(ellipses) @punctuation.special
|
(ellipses) @punctuation.special
|
||||||
|
|
||||||
|
; universal is the parameter of the function expression
|
||||||
; `:` in `x: y`, used to separate function argument from body (see above)
|
; `:` in `x: y`, used to separate function argument from body (see above)
|
||||||
(function_expression ":" @punctuation.special)
|
(function_expression
|
||||||
|
universal: (identifier) @parameter
|
||||||
|
":" @punctuation.special)
|
||||||
|
|
||||||
; basic identifiers
|
; basic identifiers
|
||||||
(variable_expression) @variable
|
(variable_expression) @variable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue