Issafalcon / lsp-overloads.nvim

Extends the native nvim-lsp handlers to allow easier navigation through method overloads.
MIT License
88 stars 4 forks source link

Add the ability to toggle the popup window #18

Closed excvai closed 1 year ago

excvai commented 1 year ago

It would be nice to have a command that will toggle the popup . Right now when I call LspOverloadsSignature when it's already shown it just draws it again instead of hiding it

Issafalcon commented 1 year ago

Hi @excvai - For sure. I've had this thought also. While my attention is on https://github.com/Issafalcon/neotest-dotnet at the moment, I have a couple things to sort out with that first, then I plan on making some more enhancements to lsp-overloads, including this.

Issafalcon commented 1 year ago

@excvai - Sorry for the wait! Shame how the day job gets in the way! 😄

The linked PR is merged and should fix this issue, and some others.

excvai commented 1 year ago

@Issafalcon Are you talking about LspOverloadsSignatureAutoToggle? Unfortunately, it doesn't seem like solving my problem. Yes it prevents the signature from showing by default but what I wanted is the ability to hide the signature by executing LspOverloadsSignature when it's already shown. Right now LspOverloadsSignature works as it worked before

Issafalcon commented 1 year ago

Hi @excvai - I mean that the built-in key mapping to close the signature window (when open) should enable you to get that "toggle" behaviour.

It was easier to implement this mechanism than to overload the LspOverloadsSignature command. So while it isn't a true 'toggle', the README shows how to create a toggle effect by mapping the same keybind in the config that closes the signature.

If you are unable to do this for whatever reason, let me know.

excvai commented 1 year ago

It works perfectly! Thanks!!!