Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.81k stars 194 forks source link

OCaml multi line string detection #988

Open Pitometsu opened 5 years ago

Pitometsu commented 5 years ago
{example|
sting with
mulitiple lines
|example}

It does not detected as parenthesis by smartparens.

Pitometsu commented 5 years ago

where {id| is begin and |id} is end of the expression.

Pitometsu commented 5 years ago

See: https://github.com/ocaml/tuareg/issues/24

Fuco1 commented 5 years ago

I don't think this is currently easily possible. We could write some code for {} pair to check if there is id| and |id at the inner borders of the sexp and adjust the returned structure.

Pitometsu commented 5 years ago

Looks like smartparents in general not very compatible with OCaml mode, even comments like (** Comment. *) it ignoring.

Pitometsu commented 5 years ago

Another cases to check are some "ppx" expressions: [@@deriving protocol ~driver:(module Jsonm)] [%of_sexp: t]