Release of Neovim 0.6.0, a modernized version of the Vim editor

The release of Neovim 0.6.0, a fork of the Vim editor focused on increasing extensibility and flexibility, has been published. The project has been reworking the Vim codebase for more than seven years, as a result of which changes are made that simplify code maintenance, provide a means of dividing labor between several maintainers, separate the interface from the base part (the interface can be changed without touching the internals), and implement a new extensible architecture on plugin based. The original developments of the project are distributed under the Apache 2.0 license, and the base part is licensed under the Vim license. Ready builds are prepared for Linux (appimage), Windows and macOS.

One of the Vim problems that prompted the creation of Neovim is a bloated, monolithic codebase of over 300 lines of C code (C89). Only a few people understand all the nuances of the Vim codebase, and all changes are controlled by one maintainer, which makes it difficult to maintain and work on improving the editor. Instead of the code built into the Vim core to support the GUI, Neovim proposes to use a universal layer that allows you to create interfaces using various toolkits.

Plugins for Neovim are launched as separate processes, for interaction with which the MessagePack format is used. Interaction with plug-ins is performed in asynchronous mode, without blocking the basic components of the editor. A TCP socket can be used to access the plugin, i.e. the plugin can run on an external system. At the same time, Neovim remains backwards compatible with Vim, continues to support Vimscript (Lua is offered as an alternative) and supports the connection of most regular Vim plugins. The advanced features of Neovim can be used in plugins built using the Neovim-specific API.

Currently, about 130 specific plugins have already been prepared, bindings are available for creating plugins and implementing interfaces using various programming languages ​​(C ++, Clojure, Perl, Python, Go, Java, Lisp, Lua, Ruby) and frameworks (Qt, ncurses, Node .js, Electron, GTK). Several user interface options are being developed. GUI add-ons are similar to plugins in many ways, but unlike plugins, they initiate calls to Neovim functions, while plugins are called from within Neovim.

Some of the changes in the new version:

  • Support for local variables has been added to vim scripts, the scope of which is limited only to the current script.
  • Significantly improved Lua language support for plugin development and configuration management. Added the ability to call Lua functions as methods in vim scripts by specifying the v:lua prefix (for example, "arg1->v:lua.somemod.func(arg2)").
  • The capabilities of the built-in LSP client (Language Server Protocol) have been expanded, which can be used to move the analysis logic and code completion to external servers. The use of LSP allows you to use more than 150 ready-made handlers for various programming languages, prepared for the Visual Studio Code code editor.
  • Improved tools for diagnosing problems in the code. Added the ability to display the text of diagnostic messages and floating windows with code associated with such messages. The processing of diagnostic messages transmitted by the LSP server is provided.
  • Added support for virtual strings that can be used, for example, to display blocks with service information.
  • Various performance optimizations have been made, such as using a hash table for highlighted group names.
  • Ended support for Windows 7 and 32-bit builds for Windows.

Source: opennet.ru

Add a comment