You must update gopls to v0.17.0, because the document/signature had a great changed. See more details
Of course, v0.0.1 is also works, which use document/hover is not recommand to query a signature.
Nvim completion source for nvim-cmp and blink.cmp.
Get the sign of the function, for example:
input:
sort.Slice.sign
output:
func (x any, less func(i int, j int) bool)
Support mockey, which is useful when making a test for ur code.
You can custom completion menu:
The key will display on the completion menu. {{name}} will be replace by function name, and {{sign}} will replace by function sign.
require('cmp_sign').setup({
good = "xxx{{name}}xxxx{{sign}}",
})
use { 'crazyhulk/cmp-sign' }
{ 'crazyhulk/cmp-sign'}
for nvim-cmp users:
require'cmp'.setup {
sources = {
{ name = 'nvim_cmp_sign' }
}
}
for saghen/blink.cmp users:
Make sure blink.compat is installed.
sources = {
default = { 'nvim_cmp_sign', 'lsp', 'path', 'snippets', 'buffer', 'copilot' },
providers = {
nvim_cmp_sign = {
name = "nvim_cmp_sign",
module = 'blink.compat.source',
-- score_offset = -3,
opts = {},
},
},
},