Upgrading to Neovim 0.12: built-in Undotree plugin, incremental selections

iain simmons April 11, 2026
Source
ICYMI, Neovim version 0.12 was released at the end of March 2026. There's quite a few roundups or summaries of the various features, so I won't go into a lot of detail, but just wanted to highlight a couple of the small changes I made after upgrading. Undotree Undotree, by mbbill is a fantastic plugin. So much so that it's now been rolled into Neovim core as a built-in plugin. See the plugin docs for Undotree. There's no need to install it before using it, but you do need to enable it. While running Neovim 0.12, you could run a command: Or you could do that somewhere in your Neovim config to make it available on startup: Or if you're like me and you don't really use it often, or are used to using the lazy.vim concept of lazy-loading for a command, an equivalent would be the following (with bonus check to ensure you're running Neovim 0.12 or higher): This way you only load it when it is actually needed. Incremental selections with Treesitter Another feature that I used to use with the old master branch of nvim-treesitter is incremental selection. That is, you visually select a range of text, and then with treesitter, you use keymaps to increment (expand) or decrement (contract) the selection. That used to be configured like this: On the main branch of nvim-treesitter, that's no longer a thing, but luckily this functionality was added in to the core of Neovim 0.12, with the default keymaps of v a n to increment and v i n to decrement. See the Neovim treesitter docs. The default mappings aren't bad, though you have to first do v a n to increment in normal mode, and then switch to just repeating a n to further increment in visual mode (and similar with v i n to decrement from normal mode and then repeat i n in visual mode). I wanted some alternative keymaps (normally I'd go with Ctrl + Space to increment and Backspace to decrement, but these were not working for me in Linux, only in macOS). I had to dig around in the Neovim source code to find the implementation. You can find them in this commit where the new default keymaps were added. Here's how I added them to my configuration: You'll notice that I first need to trigger visual mode if using these from normal mode. That took me a little while to figure out, but it works well, and it's the same in normal and visual mode. Here's how it looks: ![[attachments/nvim-incremental-selection.mp4|Incremental selection in Neovim version 0.12]] The rest I haven't yet switched to using vim.pack.add) and native plugin management. I've finely tuned my lazy.nvim based config and have not yet seen a compelling reason to move away from it.

Discussion in the ATmosphere

Loading comments...