In discussions about code editing environments for OCaml, I’ve rarely heard anyone mention Kate, the editor from the KDE project. But I just discovered that Kate’s OCaml support with its LSP client is quite good. I just needed to opam install ocaml-lsp-server and ocamlformat-rpc, and then everything just worked. It has all the typical features: show symbol type/docstring on hover, error highlighting and messages, jump to definition, plus a pop-open symbol outline. The editor also has git integration and project folder navigation.
Previously, I was happy with emacs+merlin, but sometimes I get tired of fighting emacs’ configuration, and that’s why I started searching and found this. I know most people are satisfied with VS Code, but Kate is more to my taste because it’s a desktop-native Qt app with a traditional-style GUI (with discoverable configuration dialogs!) It definitely starts up quicker.
I have no association with the Kate project, I just got excited. Does anyone else use it?
14 Likes
I’ve only passed by kate… and wrote it off as something with little support. But that was long ago considering now I use vis
, tmux
ed with a down
repl haha.
it’d be interesting to hear the experience of someone using elementary’s custom editor too, I hear it’s comfy.
I’m a Vim + Merlin user and I second that. Kate + LSP + Vi mode is easy to set up and a viable alternative.
1 Like
You should try neovim + ocaml-lsp-server ![:eyes: :eyes:](https://emoji.discourse-cdn.com/twitter/eyes.png?v=12)
1 Like
I’ve thought about it. I like the idea of Neovim, and I’m decent with vi keys, but don’t know if I’m ready to invest the effort to muscle-memorize all the other keybindings and commands for development. I used emacs for too long…
Thanks for bringing this up, I had no idea Kate had gotten so advanced and also ported over to Windows and Mac.
I’m trying it out now and it’s working great. Note for vim mode users on macOS, Ctrl-commands like Ctrl-F/B work with the Cmd key instead. And more generally for macOS, it doesn’t seem to respect my shell profile (incl. PATH
variable) when launched using the application bundle, but does when launching from the command line.
And indeed you are right, it uses the ocamllsp
server and works with OCaml out of the box, and it starts up super fast! I’ve been looking for something like this for a while, VSCode has been a little too heavy for my tastes lately.
Thanks!
3 Likes
Can anyone post a link to the page of the project?
I have been looking at it, and looks nice if it fits your needs, but it doesn’t seem very extensible.
I wish more editors follow the path neovim took and use Tree-sitter for syntax highlight, and allow more editor features.
It seems a waste to have to engineer all the same features over and over again for each language.
Also I didn’t saw any reference about how to write plugins.