During the recent VimConf, a core contributor of Neovim presented on Neovim's built in language server protocol (LSP). The presentation can be found on youtube with the title: "Vimconf.live: Neovim Builtin LSP". The demonstration and customization available to this feature seemed superior to coc.nvim, which I use today. So, I decided to give it a test drive.
After working with it on projects of various languages for over a week, the Neovim LSP felt more performant than coc.nvim. It seemed smoother and less jarring overall. Additionally, I found the ease of customization with preexisting plugins, such as completion-nvim and diagnostic-nvim, provided a cleaner and more appealing programming experience.
Without previous experience writing a plugin for Neovim, I sought guidance.
Neovim's documentation had me covered and provided an example, which serves as
a template for getting started. The documentation can be found at
Nvim documentation: lua under the
subsection entitled "LUA PLUGIN EXAMPLE". Alternatively, in Neovim you can
:help lua-require-example to view the documentation. With the Neovim
documentation in hand as well as the
Lua Reference Manual, I was off! Once, I
uncovered the appropriate APIs for executing nvim commands and invoking the
terminal, then the plugin came together rather quickly. The only issue that
caught me by surprise was Lua's unique way of pattern matching, which differed
from regular expressions and felt somewhat limiting. However, I reached a
solution, which got the job done.
In short, the plugin exposes commands for invoking Lua functions that orchestrate Nvim in a manner that runs Jest on the entire project, the file in the current buffer, or even the test name under the user's cursor. The Jest execution outputs within a split buffer.
You can find jest.nvim at: https://github.com/kubejm/jest.nvim