hrsh7th / vim-vsnip-integ

vim-vsnip integrations to other plugins.
MIT License
128 stars 16 forks source link

Doesn't get function params snippets #27

Closed glepnir closed 4 years ago

glepnir commented 4 years ago

@hrsh7th Hi. I use the completion-nvim with my custom lsp based on neovim built-in lsp. I don't get function params snippets. I think i missed something. check the server setting .the snippetSupport is true.

 config = {                                                                                                                                                                                             
                   .....                                                                                                                                                                                 
          completion = {                                                                                                                                                                                         
            completionItem = {                                                                                                                                                                                   
              commitCharactersSupport = false,                                                                                                                                                                   
              deprecatedSupport = false,                                                                                                                                                                         
              documentationFormat = { "markdown", "plaintext" },                                                                                                                                                 
              preselectSupport = false,                                                                                                                                                                          
              snippetSupport = true,                                                                                                                                                                             
              <metatable> = <table 2>          

test

hrsh7th commented 4 years ago

You can set the usePlaceholders for init_option.

My gopls's setting is below.

  lua require'nvim_lsp'.gopls.setup{
  \   capabilities = {
  \     textDocument = {
  \       completion = {
  \         completionItem = {
  \           snippetSupport = true
  \         }
  \       }
  \     }
  \   },
  \   init_options = {
  \     usePlaceholders = true,
  \   }
  \ }
glepnir commented 4 years ago

OK  I will try it。

--------------原始邮件-------------- 发件人:"hrsh7th "<notifications@github.com>; 发送时间:2020年9月2日(星期三) 凌晨0:55 收件人:"hrsh7th/vim-vsnip-integ" <vim-vsnip-integ@noreply.github.com>; 抄送:"Raphael "<glepnir@gopherhub.org>;"Author "<author@noreply.github.com>; 主题:Re: [hrsh7th/vim-vsnip-integ] Doesn't get function params snippets (#27)

You can set the usePlaceholders for init_option.

My gopls's setting is below. lua require'nvim_lsp'.gopls.setup{ \ capabilities = { \ textDocument = { \ completion = { \ completionItem = { \ snippetSupport = true \ } \ } \ } \ }, \ init_options = { \ usePlaceholders = true, \ } \ }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hrsh7th commented 4 years ago

It seems can be closed.