mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix ocaml highlights
Function matching was wrongly parenthesized, parameter detection was too eager and it was wrongly matching all + and - as delimiters
This commit is contained in:
parent
8be4fb059e
commit
b4d7ea7e66
1 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue