Features I want to try first in Neovim 0.12

💬 This is a comment on Neovim 0.12 News (archive) Neovim 0.12 was released earlier today. I don’t have enough time just now, but I’m sharing here the list of things from the release page that I want to try first. Whole new features Here are new features to replace some plugins and simplify my configuration: There is a new 'autocomplete' option. When set, completion suggestions appear in insert mode, without pressing a triggering shortcut. The 'complete' option also gains the ability to call arbitrary functions, as long as they follow the complete-functions interface. These two features combined could replace the many completion plugins that came and went over the years. I certainly hope to use them to remove mini.completion from my config. More importantly, they might help the ecosystem to standardize around a common interface for completion sources. At the moment, LSP servers play this role, but a full-blown LSP server implementation in every plugin is quite heavy. For example, crates.nvim supports some completion plugins (nvim-cmp, coq.nvim) and also exposes an LSP server for cross-compatibility support. In the future, such a crate might only implement the complete-functions interface and it could be used as a source by either native nvim completions or plugins. The other big highlight of this release is the native plugin manager, vim.pack. It was contributed mainly by Evgeni Chasnovski (known for mini.nvim). His guide of this new component is worth a read. In particular, you can pin plugins to a particular hash, for a version you have audited and update only once you have audited the changes in any new version. The default status line was reworked and integrates with vim.diagnostic.status(), vim.ui.progress_status() and an indicator for the new busy state. This will allow me to remove some custom logic to produce diagnostic status (E:2 W:3 for 2 errors and 3 warnings) and maybe even drop my custom status line code entirely. I will try to use the MarkSet to make user-placed marks visible in the gutter of the current buffer. I used plugins for that feature in the past, but it should be simple to implement it in configuration with MarkSet now. I’ll use vim.net.request() to replace some calls to external commands. It will make the configuration more portable and shorter — it might even be marginally faster, eliminating an external command call. 'diffopt' inline and inline:word will provide richer diff at the line level, a bit like delta. It’s nice to have native plugins for the undo tree (:Undotree) and to compare whole folders (:DiffTool). I plan to use the new treesitter selection shortcuts (an, in, [n and ]n in visual mode) to replace the deprecated treehopper plugin: I don’t really care about jumping to a particular highlight node, visual mode should work better for me. Polish of existing features This release introduces some nice performance improvements, for instance on Ctrl+r in insert mode and packadd. ...

March 29, 2026 · 3 min

Vim Registers

Copy-paste History Implicit Register Content " Effectively last used register. Writes to register 0. 0 Last yank. 1 d/c with %,(, ), `, /, ?, n, N, { and } or whole line. - Last small delete (less than a line). Can be the same as 1. 2-9 Last content of 1, 2, etc. 9 is lost. + * System clipboards (X11/Wayland clipboard and primary). Explicit Register Content a-z Named, use freely. Doesn’t fill numbered registers. A-Z Append to that named register. Read-Only Register Content . Last inserted text (similar to . to repeat). % Current file name. # Alternate file name. : Last executed command line. Run with @:. No Read or Write Register Content = Run an expression. _ Black hole.

Cargo Info in Neovim, or How Simple Features Go a Long Way

⚡ TL;DR Open cargo info in Vim or neovim for the package under the cursor using these 4 lines of Lua. Cargo info Rust 1.82 was released a couple of days ago. It’s packed with improvements, but one in particular caught my eye. Cargo now has a info sub-command. It displays details about a package in the registry from the comfort of your terminal. Here is an example: $ cargo info lazy_static lazy_static #macro #lazy #static A macro for declaring lazily evaluated statics in Rust. version: 1.5.0 license: MIT OR Apache-2.0 rust-version: unknown documentation: https://docs.rs/lazy_static repository: https://github.com/rust-lang-nursery/lazy-static.rs crates.io: https://crates.io/crates/lazy_static/1.5.0 features: spin = [dep:spin] spin_no_std = [spin] note: to see how you depend on lazy_static, run `cargo tree --invert --package [email protected]` Vim and neovim generally composes well with other terminal tools. So how can we easily integrate cargo info and neovim? ...

October 21, 2024 · 4 min

onedark-fast.nvim

 cljoly/onedark-fast.nvim ...

Neovim Plugins

List of my plugins for the neovim text editor. ...

minimal-format.nvim

 cljoly/minimal-format.nvim ...

Luasnip and Treesitter for Smarter Snippets

⚡ TL;DR A context-aware snippet for Go error handling code, returning the right types, with the default values. Demo Snippet ✏ Edit TJ DeVries made a video explaining an improved version of this snippet. You may still find the discussion on Go errors in this post interesting. Introduction Golang’s error handling is notoriously verbose. It was also the top pain point in the Go Developer Survey Q2 2022. Numerous proposals to simplify error handling have been written, but at the time of writing, none have been accepted. ...

August 30, 2023 · 10 min

Generating Snippets with LuaSnip in Neovim

⚡ TL;DR When you have many variations of the same snippet, one option is to generate those with Lua code. The complete example is at the end. I’ve recently moved to LuaSnip as my snippets plugin for Neovim. When I first started, I sticked to the simplest features of LuaSnip, in particular the SnipMate-like syntax for snippets. But I have now started to explore the more distinctive features of LuaSnip, like Lua-defined snippets. It turns out that generating snippets with code can save tedious repetition. ...

July 31, 2022 · 4 min

From UltiSnips to LuaSnip

⚡ TL;DR LuaSnip is fast and doesn’t have to be complicated. Give it a try! ℹ️ About UltiSnips Even if that article shows how LuaSnip shines, I have great respect for the work that has gone into UltiSnips. It is still a reliable, reasonably fast plugin given the constraint it operates in (in particular, Vim compatibility requires a fair amount of Vimscript). I’ve written this article shortly after trying LuaSnip and I’m still very much evaluating it. ...

May 15, 2022 · 7 min

bepo.nvim

 cljoly/bepo.nvim ...

Local NeoVim Plugin Development

ℹ️ Note 2023-05-20: Updated to account for the features of NeoVim 0.9 and obsolete plugins You have found a (Neo)Vim plugin that you want to fiddle with, either to contribute changes upstream or for your own use. Sounds familiar? Here are some tips and tricks I use for my NeoVim plugin development. The aim of these small tricks is to iterate faster on changes, by loading your changes in a live NeoVim instance as quickly as possible. ...

November 2, 2021 · 3 min

telescope-repo.nvim

 cljoly/telescope-repo.nvim ...

How I Got Started with NeoVim’s Lua Configuration

Four months ago I was still using SpaceVim when I stumbled upon a blog post on how to configure NeoVim with Lua. I then started to create my own configuration. In this post I’ll share the learnings acquired in the process. I hope you will find this useful to create your own configuration! Why create your own Vim config from scratch? Vim has been my daily driver for about ten years. Almost from the beginning, I used Vim distributions for ease of configuration. Spf13 vim first and then SpaceVim. With a distribution, one gets a lot of bells and whistle without spending too much time configuring things. So why spend hours setting up NeoVim from scratch? ...

July 18, 2021 · 9 min