To soar like an eagle is to rise above all the obstacles that come your way.
Following your mouse cursor, this plugin introduces a custom floating (popup) window that displays any Diagnostic (Error, Warning, Hint) with the help of the Diagnostic API of Neovim, along with LSP Information, from the LSP API.
Enhance your Neovim experience by utilizing the following features:
- Detect when the mouse hovers over an underlined part of code. Once it goes idle (for a configurable amount of time), the window will be invoked. I tried to mirror the way conventional GUI Editors like VS Code work.
- Display the Diagnostics under the current mouse position. If there are multiple diagnostics on the same position (ie Error and Warning), display them all in a numbered list. For better user experience, the window is re-rendered only once the mouse encounters a "special" character (like "{}.?:" and more). This means that it stays open if it detects mouse movement and you are still hovering over the same variable/function/operator name.
- Show LSP information (the same contents as with vim.lsp.buf.hover()).
This was a C++ workspace, with clangd and clang-tidy configured. You can also shift+click the href links to open them in your browser.
Using Lazy:
{
"soulis-1256/eagle.nvim"
},
Important
Until I test it and add it here, don't try setting additional Lazy properties (like main, config, opts) as an alternative way to setup the plugin.
require("eagle").setup({
-- override the default values found in config.lua
})
-- make sure mousemoveevent is enabled
vim.o.mousemoveevent = true
You can find the description of all the options in config.lua.
Note
The plugin has been tested on Neovim versions 0.9.4, 0.9.5 and 0.10.0
You can support me by donating through PayPal and by providing your feedback. You can message me on Discord.