soulis-1256 / eagle.nvim

Show diagnostics and lsp info inside a custom window, following the mouse position
Apache License 2.0
232 stars 5 forks source link

Add ability to cycle function overloads #14

Closed RaafatTurki closed 7 months ago

RaafatTurki commented 7 months ago

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)

soulis-1256 commented 7 months ago

Thank you. Please give me some time to think about how I can implement your request. I will come back with more to say.

soulis-1256 commented 7 months ago

Alright, I've had some time to think about it and did some research on already existing plugins that do this. I found two of them:

  1. lsp_signature.nvim: This is the most popular one and I think it can fully satisfy your request.
  2. lsp-overloads.nvim: This seems like a less popular alternative, a hybrid between lsp_signature and some other plugins that has only the ability to see and cycle overloads (compared to lsp_signature that has more use cases).

Given the options I mentioned, do you still think it is worth it to add the ability to show and cycle function overloads in my own plugin? If yes, then I need more info about your exact requirements.

  1. If I had to guess, you would want a new, optional, category on my window (besides Diagnostics and LSP Info) that would be called LSP Signature. In there, there would be the current overload and some buttons that you can click with the mouse (or keybinds instead of buttons), cycling through all the overloads.
  2. Imagining it, this would be a purely visual functionality, more restricted than what the options I described can provide. This is because my plugin's window works only in Normal mode, compared to Insert mode where you are about to actually choose which overload you want and type/select it. So given this, you want me to actually implement something like a third button, or a third keybind that automatically goes through the following sequence: close the window -> capture the shown overload -> enter Insert mode -> type the overloaded function with mock arguments?

So that's my basic analysis, I await your response.

soulis-1256 commented 7 months ago

It's been some time since you asked for this feature and there is still not a clear development plan, so I'm going to turn this into a discussion.