The conclusion of the Neovim & Busted testing sage is coming to a close with this new plugin: neotest-busted (GitHub mirror). In my previous post I mentioned that that I wanted to write a Neotest adapter for the busted test framework, so here it is.
In a previous blog post I wrote about testing Lua scripts in Neovim using the busted test framework. Today I want to look at how to debug Lua scripts in Neovim using the Debug Adapter Protocol (DAP). Just as before with busted, our problem is that we need to use Neovim as our Lua interpreter because we want to use Neovim's Lua API. At the same time, the debug adapter expects the Lua interpreter to conform to Lua's command-line interface. That's right: we need another command-line interface adapter.
I have just published version 0.3.0 of rainbow-delimiters.nvim (GitHub mirror). This update brings in a number of the usual improvements to to queries and strategies, but more importantly it also makes configuration at runtime more flexible, but most importantly in light of the current date it also includes a fun little Christmas-themed strategy.
No, not another rewrite. Much better than that: the long-standing ugliness of highlighting being limited to only one node at a time has been fixed. Previously only one opening node and one closing node could be highlighted. This was perfectly adequate for most languages where you have one opening parenthesis and one closing parenthesis. However, consider HTML: we want to highlight the opening and closing tag, but if we highlight the entire top-level node we also highlight the attributes of the tag, which looks too vibrant. The alternative was highlighting the tag name, but this left the angle brackets without highlighting, which looked jarring as well.
Wait what, again? Yes, another rainbow delimiter plugin, a fork of a fork. The previous one nvim-ts-rainbow2 was built as a module for nvim-treesitter because that is what the original plugin did and what everyone else was doing. However, nvim-treesitter is deprecating the module system. This means nvim-ts-rainbow2 will eventually stop working, so we will need a new rainbow plugin sooner or later anyway.
Two months in the making, it is time to finally release my new Neovim plugin officially: nvim-ts-rainbow2 (GitHub mirror). This plugin uses Neovim's built-in Tree-sitter support to add alternating highlighting to delimiters. This is usually known as “rainbow parentheses”, but thanks to Tree-sitter we are not limited to parentheses, we can match any kind of delimiter, such as tags in HTML or
endblocks in some programming languages.
I am glad to announce a new Neovim plugin: nvim-cmp-vlime (GitHub mirror). It is a completion source for nvim-cmp which uses the Vlime plugin to fetch completion candidates from a running Common Lisp process. Vlime is a plugin similar to Slime for Emacs, it lets the editor communicate with a running Lisp process so we can evaluate code at runtime, debug, inspect values, and of course get auto-completion. In fact, Vlime uses the same Backend, Swank, as Slime, so the results should be equally good.
Recently I have switched my Neovim setup to using the new native Vim package system directly instead of relying on a plugin manager. I had to use Git submodules for another project anyway, so I figured I could combine them with Vim packages and see how that might work out. It is actually working pretty well, to the point where I don't think that I will be returning to plugin managers for the foreseeable future.
Sometimes you want to have a set of Vim settings specific only to a certain project. There are many tips out there how to achieve such a setup, but most of them expose the user to serious security risks. I am going to describe the fundamental problem and how to solve it. TL;DR: use the vim-addon-local-vimrc plugin.
My article for the website Learn X in Y minutes about Vim scripting has been accepted; the article teaches you how to get started with Vim's built-in custom scripting language in a very concise manner. It has been quite an enjoyable topic to write about and I even ended up learning a few new tricks myself.