lsp_signature.nvim icon indicating copy to clipboard operation
lsp_signature.nvim copied to clipboard

[Feature] Option to show return type in virtual text

Open ofirgall opened this issue 3 years ago • 3 comments

Hey, I'm using the plugin only with virtual text to achieve a minimal view of the current argument like so: Screenshot from 2022-09-17 11-45-33

I would like to be able to configure the plugin to add a virtual text for the return type too, is it possible?

Btw this my cfg:

local lsp_signature_cfg = {
	bind = true,
	use_lspsaga = false,
	doc_lines = 0,
	floating_window = false,
	hint_scheme = 'LspSignatureHintVirtualText',
	hint_prefix = ' ',
}

ofirgall avatar Sep 17 '22 08:09 ofirgall

The Lsp does not specify the return type in its response. So it is possible but requires some efforts. Also, it may differ from language to language.

ray-x avatar Sep 17 '22 09:09 ray-x

Doesn't the floating window shows the return type?

ofirgall avatar Sep 17 '22 09:09 ofirgall

The floating shows the function definition. So it requires a parser to get the return type.

ray-x avatar Sep 17 '22 10:09 ray-x