soulis-1256 / eagle.nvim Goto Github PK
View Code? Open in Web Editor NEWShow diagnostics and lsp info inside a custom window, following the mouse position
License: Apache License 2.0
Show diagnostics and lsp info inside a custom window, following the mouse position
License: Apache License 2.0
Hi, amazing plugin!
I'd love to see this plugin get the ability to cycle function overloads in languages that supports it (c++, c# .. etc)
My initial testing shows that the popup only shows up with the focused window, when there are many splits on screen.
I does not find any info about this explicitly, so does this currently support mousing hovering on non-focused window?
Thanks for the plugin.
Very cool plugin, i love it! Only i am doing something wrong in my config apparently and i was not able to fix it. Here is a screenshot:
This shows:
vim.lsp.buf.hover()
gives me with treesitter and noice installed (if that matters).In your video in the README.md
of this repo, i can see that eagle supports rendered output. So i think there must be something wrong with my setup, but i struggle to find out what it is.
Eagle's config snippet is this:
{
"soulis-1256/eagle.nvim", -- Following the mouse cursor hover, a custom floating window displays diagnostics (E/W/H) along with LSP info
enabled = true,
config = function()
require("eagle").setup({
render_delay = 250,
title_color = "", -- didn't like the default, so NO color here
border_color = "", -- didn't like the default, so NO color here
border = "rounded",
window_row = 0,
window_col = 5,
})
end
},
I played with the config, the lsp server config, noice plugin config etc. but i was never able to get eagle's hover window to display the same colored/formatted output as vim.lsp.buf.hover()
does.
When moving the mouse over an lsp-message in a maximized or zen-mode window/pane I get the desired floating-window with it's corresponding message.
Bug:
When moving the mouse away, the window doesn't disappear, instead I get an error:
zen-mode-error:
E5108: Error executing lua: .../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:279: Invalid window id: 1000
stack traceback:
[C]: in function 'nvim_set_current_win'
.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:279: in function 'check_mouse_win_collision'
.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:246: in function <.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:237>
maximize-window-error:
E5108: Error executing lua: .../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:279: Invalid window id: 1000
stack traceback:
[C]: in function 'nvim_set_current_win'
.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:279: in function 'check_mouse_win_collision'
.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:126: in function 'close_float_window'
.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:254: in function <.../share/nvim/lazy/hoverhints.nvim/lua/hoverhints/init.lua:237>
While it seems the error is possibly caused by other plugins (I don't know who's responsibility it should be?) ...
I'd love to see you safeguard for this error in this plugin.
This plugin gets a big like from me, and I can see it being useful quite a lot...
Anyway:
I frequently use maximized windows because I focus on a pane while having splits in my layout.
If the error isn't fixed, I guess I'll have to disable/uninstall it and look for another solution to display my lsp-errors,
which would be a pity, especially since this plugin brings value on top of my necessity.
I can't have my workflow disrupted this way, having to manually/:q close my overlay every time I hover an lsp-error in a currently maximized window.
Solution:
Can you safeguard the error and make the window disappear anyway?
Maybe you can keep the window-id of the window in which the last overlay was triggered in some global var???
And remove the window when the caught error occurs - instead of having nvim through an error?
Description:
When hovering and displaying with hover-hint in a split window (which is not the first window in the first tab),
it seems to me ...
it's "onHoverOut" automatically switching the focus/cursor to the first window in the first tab.
There's no error msgs occurring or anything, plus I guess you'll know already anyway ...
Expected Behavior:
I don't want my focus/cursor to be switched to another window/pane at all
I am using the LazyVim setup I installed this plugin according to the docs. Despite being loaded, the plugin fails to display any content in the hover window motion as expected.
my config:
return {
{
"soulis-1256/eagle.nvim",
-- opts = {},
-- config = function(_, opts)
-- require("eagle").setup(opts)
-- end,
-- config = true,
-- init = function()
-- vim.o.mousemoveevent = true
-- end,
},
}
I tried a various combination of configurations but I am not able to run it. Tested on files with python, terraform, and golang.
Is it possible to trigger this just using the keyboard, I avoid using the mouse for anything in vim, but I don't see anything in the docs about keyboard usage.
Also, I wanted to mention I just posted an enhancement request to lsp-saga
which I think you might find interesting. Basically my request there is what you seem to be planning, which is "diagnostics & LSP" in the hover a la VS Code.
Also really nice work here! I'm watching this closely as this is a feature I've missed from nvim
for a long time, although I do think that integrating this with a wider set of LSP tools as part of something like lsp-saga
offers a lot of scope to further enhance this as a part of a users workflow (as I describe in my above issue).
But maybe you already have similar plans and ideas? ๐
Hello, could it also be possible to trigger vim.lsp.buf.hover()
on mouse hover?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.