diff options
| author | figsoda <figsoda@pm.me> | 2022-11-21 18:18:11 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-11-24 00:13:12 +0100 |
| commit | 770066ba01b0ec276c5589145d28697c77255477 (patch) | |
| tree | f81de3e1aabfe9427e3cd307d1a5b14004bb5449 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.tar nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.tar.gz nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.tar.bz2 nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.tar.lz nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.tar.xz nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.tar.zst nvim-treesitter-770066ba01b0ec276c5589145d28697c77255477.zip | |
highlights(nix): highlight parameters
| -rw-r--r-- | queries/nix/highlights.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/queries/nix/highlights.scm b/queries/nix/highlights.scm index 25f192b05..3885d5d90 100644 --- a/queries/nix/highlights.scm +++ b/queries/nix/highlights.scm @@ -49,13 +49,18 @@ ; `?` 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 -(formal "?" @punctuation.special) +(formal + name: (identifier) @parameter + "?"? @punctuation.special) ; `...` in `{ ... }`, used to ignore unknown named function arguments (see above) (ellipses) @punctuation.special +; universal is the parameter of the function expression ; `:` 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 (variable_expression) @variable |
