A Neovim plugin that provides a floating window for diagnostics and LSP information.
Smart Mouse Tracking — Detects when the mouse hovers over underlined code. Once idle (configurable delay), a floating window appears, mirroring the behavior of conventional GUI editors like VS Code.
Comprehensive Diagnostics — Displays all diagnostics (Errors, Warnings, Hints) under the current position. Multiple diagnostics at the same location are shown in a numbered list.
LSP Integration — Shows LSP hover information (same content as vim.lsp.buf.hover()).
Intelligent Re-rendering — The window only re-renders when the mouse encounters a "special" character (like {}.?:), staying open while hovering over the same variable/function/operator name.
Keyboard Mode — Opt-in keyboard control that can work alongside or independently of mouse control (eg. using the <Tab> key).
Highly Customizable — Extensive configuration options for appearance, timing, and behavior.
| Feature | Built-in vim.diagnostic.open_float() |
Built-in vim.lsp.buf.hover() |
eagle.nvim |
|---|---|---|---|
| Mouse tracking | ❌ | ❌ | ✅ |
| Combined diagnostics + LSP | ❌ | ❌ | ✅ |
| Smart rendering | ❌ | ❌ | ✅ |
| Keyboard + Mouse cooperation | ❌ | ❌ | ✅ |
API level 12 (tested on a version as old as 0.10.2.show_lsp_info=false so you save some cpu cycles (see more in Configuration).Create a file under lua/plugins/eagle.lua:
return {
{
"soulis-1256/eagle.nvim",
config = function()
require("eagle").setup({
keyboard_mode = true,
})
vim.o.mousemoveevent = true
vim.keymap.set('n', '<Tab>', ':EagleWin<CR>', { noremap = true, silent = true })
end,
},
}
Basic setup:
{
"soulis-1256/eagle.nvim",
opts = {},
config = function(_, opts)
require("eagle").setup(opts)
vim.o.mousemoveevent = true -- Required for mouse mode
end,
},
With keyboard mode enabled:
{
"soulis-1256/eagle.nvim",
opts = {
keyboard_mode = true,
},
config = function(_, opts)
require("eagle").setup(opts)
vim.o.mousemoveevent = true
vim.keymap.set('n', '<Tab>', ':EagleWin<CR>', { noremap = true, silent = true })
end,
},
Alternative setup (if you encounter issues with opts):
{ "soulis-1256/eagle.nvim" },
Then in your config:
require("eagle").setup({
-- your options here
})
vim.o.mousemoveevent = true
All options can be passed to the setup() function. See config.lua for documentation.
{
show_headers=true,
order=1,
concealcursor="nv",
conceallevel=1,
improved_markdown=true,
mouse_mode=true,
keyboard_mode=false,
logging=false,
close_on_cmd=true,
show_lsp_info=true,
scrollbar_offset=0,
max_width_factor=2,
max_height_factor=2.5,
render_delay=500,
detect_idle_timer=50,
window_row=1,
window_col=5,
border="single",
title="",
title_pos="center",
title_color="#8AAAE5",
border_color="#8AAAE5",
diagnostic_header_color="",
lsp_info_header_color="",
diagnostic_content_color="",
lsp_info_content_color="",
}
<Tab> is your custom keybind)<Tab> and the floating window will appear at your cursor position<h>,<j>,<k>,<l>), or press <Tab> again to enter it<Tab> one last time to close it (once inside)| Command | Description |
|---|---|
:EagleWin |
Toggle the eagle window at the current cursor position |
Make sure mousemoveevent is enabled:
vim.o.mousemoveevent = true
This must be set for mouse tracking to work.
keyboard_mode = true in your setup:EagleWin:vim.keymap.set('n', '<Tab>', ':EagleWin<CR>', { noremap = true, silent = true })
show_lsp_info = true (default):LspInfo:lua vim.lsp.buf.hover()If you're using other plugins that provide hover functionality (like noice.nvim or custom LSP handlers), you may need to disable their hover features or configure them to not conflict with eagle.nvim.
To diagnose issues, enable logging:
require("eagle").setup({
logging = true,
})
Contributions are welcome! Here's how you can help:
If you find this plugin useful, consider supporting its development: