Shougo / neosnippet.vim

neo-snippet plugin
Other
1.12k stars 108 forks source link

Neosnippet always expand one parameter from lsp #496

Closed amikai closed 4 years ago

amikai commented 4 years ago

When i using neosnippet completion for parameter, no matter how many parameter it have, it always expand one parameter. See the follwing two screenshot.

  1. screen shot 1: io.ReadFull has two parameter image
  2. screen shot2: abc has three parameter image

So i print the lsp_item at this line, i found 'newText':'abc(${1:})' (screenshot2 example)

Shougo commented 4 years ago

Reproduced. But it is not neosnippet problem. Because, gopls's result is only one parameter.

It should be reported in gopls. Closing.

Note: Other LSP like pyls works for me instead.

Shougo commented 4 years ago

And, you should provide more information to reproduce the problem. You have not upload reproduce instructions. We have not ESP skills.

amikai commented 4 years ago

Sorry for that, i will give detailed steps next time.

Shougo commented 4 years ago

OK

Shougo commented 4 years ago

OK. It is not gopls problem probably. You need to configure gopls like this.

lua require'nvim_lsp'.gopls.setup{
      \ init_options = {
      \   usePlaceholders = true,
      \ }
      \}

Note: It is suggested by @hrth7th.

amikai commented 4 years ago

It work. THX