ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.02k stars 57 forks source link

Toggle signature when in select mode - golang function arguments placeholders #222

Closed ziombo closed 1 year ago

ziombo commented 1 year ago

I have lsp_signature disabled by default and show it when needed with the use of toggle_key set in config. This works great until I'm in a function which has filled placeholders by gopls (language server). Then it initially start with the first parameter selected and wait for a keypress to replace it and enter insert mode in which I can toggle the documentation, however I sometimes want to toggle the signature, to know what kind of arguments are expected.

Can't toggle signature: image

after pressing 'l' I can toggle the signature with my toggle_key: image

ray-x commented 1 year ago

Do you know what is the vim mode when you are in placeholders? Also what is the snippet plugin you are using?

ziombo commented 1 year ago

How could I check the current vim mode without interrupting the mode itself? I'm using LuaSnip, but like I mentioned the screenshot is coming from Gopls setting usePlaceholders

ray-x commented 1 year ago

In your statusline, it should show the current vim mode.

ziombo commented 1 year ago

It's in SELECT mode

ray-x commented 1 year ago

I added keymap for both visual and select mode. Hope it helps.

ziombo commented 1 year ago

Works like a charm. Thanks!