Neovim: An Ambitious Extensible and Customizable Text Editor

Neovim logo

Neovim logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License

Neovim, a fork of Vim, is what these editors are often compared against. Although it does not support collaboration out of the box, it has a plugin system, which is taken advantage of extensively. “Plugin UI Architecture” lays out the plugin architecture. The communication between the core and the GUI is done through MessagePack (“It’s like JSON. but fast and small”) (Wikipedia)-based RPC. For example, it can run in Web browsers. In addition, it also offers a separate remote API. Plugins can be implemented in any language, and are executed in their own processes and communicate with the Neovim instance either locally or remotely. Collections of awesome neovim plugins.

Similarly, if you were to run Emacs on Web browser, see “Is embedding Emacs in a browser possible? : emacs.” Obviously, it is a whole lot harder to do than with Neovim, but one way is to use WeTTY: Terminal in browser over http/https and run Emacs on it, either locally or remotely. Cloudmacs uses Docker for the Emacs instance, and seems to be a simple extension of that idea.

I am not sure plugins are always run in separate processes.

Vim is extensible with the script language Vim Script (otherwise called VimScript or VimL), which feature Neovim inherits, but Neovim in addition supports and encourages the use of Lua instead as the extension language.

Neovim offers the following two advanced features to provide language-specific assistance: Support for Tree-Sitter and support for Language Server Protocol (LSP).

Tree-sitter is a generator for incremental parsers. It was not obvious from the website, but it seems it was developed by GitHub for its Atom text editor. Nvim Treesitter configurations and abstraction layer. By the way, Node.js bindings for tree-sitter called Node-Tree-Sitter exists, and it seems you can access all the functionality of the generated parser from Javascript. The way you specify where changes have been made may be a good match for OT- or CRDT-based editing, e.g.,  Delta in “OT: Operational Transformation.”

The Language Server Protocol (LSP) (Wikipedia) is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide programming language-specific features. The goal of the protocol is to allow programming language support to be implemented and distributed independently of any given editor or IDE. It was originally developed for Microsoft Visual Studio Code and is now an open standard. There is a companion format called Language Server Index Format, or LSIF, read “else if,” whose goal is to “support rich code navigation in development tools or a Web UI without needing a local copy of the source code.”

I would think public LSP servers are available somewhere, but I could not find any. As far as I know, no parser-generating tools are available specifically for LSP.

Postscript: Onivim 2 is a cross-platform Vim descendant. It uses its own libvim: The core Vim editing engine as a minimal C library (but also compiles to WebAssembly/ Wasm), which is based on Vim, not Neovim. They say the choice was mostly due to the build issues they faced with Neovim. Onivim 2 also supports VS Code extensions via the Open VSX extension registry.

It has a unique licensing scheme. It is source-available software, but the master branch of the repository is not open-source; it comes with a commercial license. However, every commit there will be dual-licensed under the permissive MIT license in 18 months.

Neovim: An Ambitious Extensible and Customizable Text Editor」への1件のフィードバック

  1. ピンバック: Xi and Xray | あくまで暫定措置としてのブログ

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト /  変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト /  変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト /  変更 )

%s と連携中

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください