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

Better window trigger after hiding the window while typing. #16

Closed williamhCode closed 1 year ago

williamhCode commented 1 year ago

I use the events that will close the signature popup window when typing in insert mode.

However, if I'm typing a comma when typing within a parameter without going to the next (for example typing a list in python), the signature window pop ups again even though I'm still on the same parameter.

It would make more sense for the signature window to pop up after I type a comma that moves on to the next parameter. I don't know if that's even possible thou.

By the way, I really appreciate you for making this plugin. I've been having weird issues with both cmp-nvim-lsp-signature-help and lsp-signature.nvim, but this plugin has been working really well for me!

Some extra suggestions:

These are just suggestions thou, do whatever you want with them!

Issafalcon commented 1 year ago

Hi @williamhCode . Thanks for raising an issue, and glad you like the plugin!

The signature popup is triggered by the LSP triggerCharacters. I can't say I program much in python, so it could be that the triggers chars for python just need tweaking. Would you be able to provide a small sample repo / code, with an example of the issue you're seeing please? Maybe with a video?

Thanks for the suggestions. I think a z-index option would be a good idea. As for your second suggestion, I also use the same keymaps for window navigation, but they only take precedence when the signature popup window is open, so I'm not sure that they are that intrusive. I work with them regularly without issue, but I guess everyone has their own way of doing things, so I think I'll just stick with having the ability to customize the mappings, rather than not having them altogether.

williamhCode commented 1 year ago

The signature popup is triggered by the LSP triggerCharacters. I can't say I program much in python, so it could be that the triggers chars for python just need tweaking. Would you be able to provide a small sample repo / code, with an example of the issue you're seeing please? Maybe with a video?

Yeah sure:

https://user-images.githubusercontent.com/83525937/211118386-6c217e03-a644-4b16-8de0-c0a9e314fdf8.mov

As you can see, if I type comma, even when not going to the next parameter, the signature pops up again. It happens in every language, not just python. But it just happens more often in python since you pass tuples/lists around pretty often. Since it's triggered by LSP triggerCharacters, it might be intended behavior and I'll have to suggest this upstream.

Also, by "window always float on top", I meant for an option for the window to stay above the cursor, since the completion window will generally stay on the bottom. So if someone likes to have the signature window stay open, the completion window will not overlap it (for the most part). Lsp_signature has this option in the form of "floating_window_above_cur_line". Although z-index would be helpful too!

Issafalcon commented 1 year ago

Hi @williamhCode - Just here to say I haven't forgotten about this! Been a busy month, and my focus is on https://github.com/Issafalcon/neotest-dotnet right now. Once I've resolved a couple of major issues with that, I can return my focus to this plugin for a while.

Issafalcon commented 1 year ago

Check out #20 - This should allow you to provide the float above cursor option.

Still looking into the trigger chars for tuples to think of the best way to handle it with the least amount of changes to the code.

williamhCode commented 1 year ago

Thanks for the feature, highly appreciated!

Issafalcon commented 1 year ago

I'm just closing this ticket and moving this over to #29 to handle the tuple stuff.