nui-diagnostic.nvim
A small Neovim plugin that jumps between diagnostics and shows the current diagnostic together with available LSP code actions in nui.nvim popups.
A Neovim plugin that shows code errors and available fixes in floating popups as you navigate between diagnostics, letting you apply fixes by pressing a number key.
This is a plugin for Neovim, a text editor used mainly by developers. The plugin improves how Neovim shows errors and warnings in your code, and how you act on them.
When a language server (a background process that understands your programming language) finds a problem in your code, Neovim normally stores that information as a diagnostic. This plugin gives you a way to jump between those diagnostics one at a time, and as you land on each one, it opens a small floating popup showing the message. A second popup appears alongside it listing the available code actions, which are fixes or refactors the language server is offering for that problem. You pick an action by pressing the corresponding number key.
The plugin depends on nui.nvim, a library for building popup windows in Neovim. Both popups close automatically when you move the cursor or enter insert mode. You can also close them manually with the Escape key.
Setup is a single call to the setup function, which can be done through lazy.nvim or vim.pack, the two common plugin managers. Key mappings for navigating to the next and previous diagnostic, or specifically to the next and previous error, can be enabled through a configuration option or set manually. The appearance of the popups is configurable: border style, width, height, wrapping, and transparency. You can also control how many code actions are shown, whether disabled actions are included, and which number keys trigger them.
A built-in health check command lets you verify the plugin and its dependencies are set up correctly. The plugin requires Neovim 0.10 or later and is released under the MIT license.
Where it fits
- Jump through code errors one by one and instantly see fix suggestions without leaving your editor.
- Apply language server code fixes by pressing a number key instead of navigating menus.
- Customize how diagnostic popups look and behave to match your Neovim setup.