diff options
| author | Pau Ruiz Safont <unduthegun@gmail.com> | 2020-09-12 22:00:46 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-09-12 23:11:05 +0200 |
| commit | b4d7ea7e66eb2d831db3dcd4452de99927bfca59 (patch) | |
| tree | 8285204671cd6f8da1071705a5eb915f19b89fad /queries/ocaml | |
| parent | Update PHP query (diff) | |
| download | nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.tar nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.tar.gz nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.tar.bz2 nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.tar.lz nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.tar.xz nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.tar.zst nvim-treesitter-b4d7ea7e66eb2d831db3dcd4452de99927bfca59.zip | |
fix ocaml highlights
Function matching was wrongly parenthesized, parameter detection was too
eager and it was wrongly matching all + and - as delimiters
Diffstat (limited to 'queries/ocaml')
| -rw-r--r-- | queries/ocaml/highlights.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/queries/ocaml/highlights.scm b/queries/ocaml/highlights.scm index 013f00d7f..e5ee92e1a 100644 --- a/queries/ocaml/highlights.scm +++ b/queries/ocaml/highlights.scm @@ -38,8 +38,12 @@ [(value_name) (type_variable)] @variable (let_binding pattern: (value_pattern) @variable) +(let_binding pattern: (tuple_pattern (value_pattern) @variable)) -(value_pattern) @parameter +(let_binding (parameter (label_name) @parameter)) +(let_binding (parameter (value_pattern) @parameter)) +(let_binding (parameter (typed_pattern (value_pattern) @parameter))) +(function_type (typed_label (label_name) @parameter)) ; Application ;------------ @@ -55,7 +59,7 @@ (#eq? @operator "|>")) (application_expression - function: (value_path (value_name)) @function) + function: (value_path (value_name) @function)) ( (value_name) @function.builtin @@ -140,7 +144,7 @@ (object_type ["<" ">"] @punctuation.bracket) [ - "," "." ";" ":" "=" "|" "~" "?" "+" "-" "!" ">" "&" + "," "." ";" ":" "=" "|" "~" "?" "!" ">" "&" "->" ";;" ":>" "+=" ":=" ".." ] @punctuation.delimiter |
