OCaml support in Zed editor

The zed editor is a modern and very snappy editor developped in rust. It’s a bit behind more mature emacs/vim/vscode in term of features, though it’s already pretty usable. There is an ocaml extension which I contributed to a little bit.

I’d be curious to know if other people have tried this editor and would be willing to put a little bit of work into the extension. For now I do it mostly for myself. And would probably have more motivation if I knew it’s actually being used by other people too.

9 Likes

For some weeks, I am giving the zed editor a try. So far, I am pretty happy with it. Thanks for the extension! And I am willing to help you with the extension, but I have no idea where to start.

I use it! I’ll consider contributing too if I write more ocaml. Would be great to get it as robust as the ocaml vscode platform.

Zed’s my daily driver now, especially now that their agentic editing feature is out.

I have been using using Zed for ocaml programming the past few months to work on my side project (very slowly implementing the languages in TAPL). I have really enjoyed Zed thus far. It would be nice if there was syntax highlighting for menhir and ocamllex.

there is GitHub - Kerl13/tree-sitter-menhir: Menhir grammar for tree-sitter so it should be possible. Could you please open a feature request on the ocaml extension repo?

1 Like

I am in the middle of considering a switch to it from Sublime Text. I haven’t signed up for a login account (yet). Mostly focused on how well it works as an offline only text editor. So far, it seems like it’s not a downgrade, i.e. most of what bugs me about the OCaml support is probably not on the editor but rather on deficiencies in the OCaml LSP (which, sadly, I am not in a position to help contribute improvements). I wish there were a DAP adapter. It feels like Zed could be a decent alternative to VSCode.

The Debugger is Here — Zed's Blog was announced in June so there is DAP support. It should be possible to get that working with bytecode debugger https://github.com/hackwaly/ocamlearlybird or native debugger using LLDB DAP server.