Editor w/ LSP support; scriptable in Rust

I know about IntelliJ, Emacs, Vim, Xi.

Is there any editor that:

  1. has LSP support

  2. is either (1) written in Rust or (2) easy to script / extend via Rust ?


1 Like

Why does it matter what language the editor itself is written in?

1 Like

I believe you are referring to:

I don't require that it be written in Rust (note the "or") -- only that it is easy to extend in Rust.
Being written in Rust is one way to fulfill the requirement of "extend in Rust".

Do I also need to justify why I want "easily extensible in Rust" ?

Neovim has an RPC interface (using msgpack) and as such can be extended in any language.

Another alternative is http://kakoune.org.

I also feel that there's an under-explored space for a desktop GUI application platform (not necessary an editor), which uses WASM modules as a unit of extensibility.


kakoune may indeed be a good choice. It's trivial to extend using any language through POSIX API. The lsp implementation is a plugin in Rust. Biggest downside is that it will not work out of the box on windows (you need cygwin or WLS).
Of course, neovim is also a good choice.

I would really love to see that: a solid editor with wasmtime (or something like a "wasm machine", the same way emacs is a "lisp machine").

1 Like

In this model, does the user send wat s-exps, which are then loaded + evaluated in wasmer/wasmtime ? Or does the user type in some dsl / new language, which is dynamically compiled to wat and sent over ?

(I am also a fan of the gist of the idea, but I can't 'see' how the practical details work together yet.)

I was more thinking about loading .wasm files providing commands, adding hooks on specific events, etc. Even a basic toml config could be used to enumerate the files and select appropriate permissions (I guess we can handle live reloading somehow). How much it is a "wasm machine" will depends on how many functions the program exposes and how modular it is. I think the biggest challenge is to get well-defined interfaces down. Not an easy task, for sure. I'm not sure I would be able to find the time to actually develop that from scratch myself, but I would love to contribute to such a project.

These could probably be used to build a prototype however (note to myself):

On a similar note, there is a fork of emacs called emacs-ng and supporting web assembly.

Emacs-ng also has WebAssembly support - compile your C module as WebAsm and distribute it to the world. Don't worry about packaging shared libraries or changing module interfaces, everything can be handled and customized by you the user, at the scripting layer. No need to be dependent on native implementation details.

See also: GitHub - ubolonton/emacs-module-rs: Rust binding and tools for Emacs's dynamic modules

GitHub - helix-editor/helix: A post-modern modal text editor. looks interesting.

1 Like