Any editor plugins/modes equivalent to Gopcaml-mode, structural navigation for OCaml?

Hihi~ after a very long hiatus from any OCaml programming, I’m slowly getting back into things, anyway uuh, I might be a little bit biased, but I’ve been missing the keybindings and navigation support of gopcaml-mode haha since using OCaml 5.0 and been tempted to like upgrade it to the latest version.

As I’ve been out of the ecosystem for a while I was wondering if there was any like established tree-sitter based navigation plugin that people had built for OCaml in the meantime? I’m more than happy to update gopcaml mode, I’m guessing I’m probably the only user lol, but if there is some effort ongoing, I’d be happy to contribute

4 Likes

This package looks promising since it uses treesitter and supports multiple languages.

2 Likes

It’s a subject that’s on the minds of the current Merlin (and OCaml-LSP) maintainers, persistently. We’d be delighted to discuss it with you!

2 Likes

I know nothing about gopcaml-mode. Can you give an URL ?

1 Like

Ultimate Ocaml editing plugin, providing advanced structural editing, movement and analysis in Emacs.

You can also watch this excellent presentation about it!

2 Likes

oh yep, I’d be happy to discuss! I received an email from Gabriel a while back asking about something to do with structural editing, but at the time I was still going through burnout and wasn’t able to join in, but yeah, now I’m getting back into things, and would be happy to hack some structural editing support into OCaml/LSP/Merlin!

2 Likes

It would be great if that navigation would integrate well with other languages in some common way like Combobulate or LSP. Being able to switch between OCaml and C/Rust/Haskell etc is so useful.

The structural editing and navigation bindings from Elisp/Common Lisp are comprehensive. Structural editing in vanilla Emacs gives a brief summary of the keybindings.

1 Like