Ppxlib.Merlin_helpers
Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.
More information can be found in the section of the manual about locations.
val hide_attribute : Astlib.Ast_500.Parsetree.attribute
Adding this [@merlin.hide]
attribute on a piece of AST "hides" it from merlin: it tells merlin not to consider that branch if another piece of AST with the same location exist.
val focus_attribute : Astlib.Ast_500.Parsetree.attribute
Adding this [@merlin.focus]
attribute on a piece of AST tells merlin to prefer it to any other piece of AST when several have the same location.
The following functions add the corresponding attribute (defined above) to specific pieces of AST.
val hide_pattern :
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.pattern
val focus_pattern :
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.pattern
val hide_expression :
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression
val focus_expression :
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression