diff options
| author | Pau Ruiz Safont <unduthegun@gmail.com> | 2021-02-27 20:11:32 +0000 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-02-28 22:32:07 +0100 |
| commit | 0df1803056ba5da4544ae16f09674f435ea35e8c (patch) | |
| tree | f3c230dbad57d753964de14f83544379179079a1 | |
| parent | highlights(ocaml): add unit and pretty_printing_indication (diff) | |
| download | nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.tar nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.tar.gz nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.tar.bz2 nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.tar.lz nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.tar.xz nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.tar.zst nvim-treesitter-0df1803056ba5da4544ae16f09674f435ea35e8c.zip | |
highlights(ocaml): change order or captures
This because the later captures have more priority in neovim, not less
like in upstream.
This fixes highlighting highlighting for let* and +, for example.
| -rw-r--r-- | queries/ocaml/highlights.scm | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/queries/ocaml/highlights.scm b/queries/ocaml/highlights.scm index 7ae9194cb..419d7ac7c 100644 --- a/queries/ocaml/highlights.scm +++ b/queries/ocaml/highlights.scm @@ -85,30 +85,6 @@ (pretty_printing_indication) ] @punctuation.special -; Operators -;---------- - -(match_expression (match_operator) @keyword) - -(value_definition [(let_operator) (and_operator)] @keyword) - -[ - (prefix_operator) - (infix_operator) - (indexing_operator) - (let_operator) - (and_operator) - (match_operator) -] @operator - -(prefix_operator "!" @operator) - -(infix_operator ["&" "+" "-" "=" ">" "|" "%"] @operator) - -(signed_number ["+" "-"] @operator) - -["*" "#" "::" "<-"] @operator - ; Keywords ;--------- @@ -150,6 +126,30 @@ "->" ";;" ":>" "+=" ":=" ".." ] @punctuation.delimiter +; Operators +;---------- + +[ + (prefix_operator) + (infix_operator) + (indexing_operator) + (let_operator) + (and_operator) + (match_operator) +] @operator + +(match_expression (match_operator) @keyword) + +(value_definition [(let_operator) (and_operator)] @keyword) + +(prefix_operator "!" @operator) + +(infix_operator ["&" "+" "-" "=" ">" "|" "%"] @operator) + +(signed_number ["+" "-"] @operator) + +["*" "#" "::" "<-"] @operator + ; Attributes ;----------- |
