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

Config option to disable method placeholders for gopls

Open alphatroya opened this issue 3 years ago • 4 comments

As the title says, I would like to disable this feature for myself, how can I do this?

alphatroya avatar Sep 06 '22 10:09 alphatroya

Could you share a screen shot. I am not 100% sure what you mean by method placeholders

ray-x avatar Sep 06 '22 11:09 ray-x

Screenshot 2022-09-06 at 14 47 52

I mean method parameters placeholder of course

alphatroya avatar Sep 06 '22 12:09 alphatroya

using this: go.setup({ settings = { gopls = { usePlaceholders = true, } })

ray-x avatar Sep 06 '22 14:09 ray-x

Looks like, did not help

alphatroya avatar Sep 06 '22 16:09 alphatroya

@alphatroya this works for me, should be inside lsp_cfg like

go.setup({
  lsp_cfg = {
    capabilities = capabilities,
    settings = {
      gopls = {
        usePlaceholders = false,
      },
    },
  },
  lsp_on_attach = on_attach,
})

ljupcho avatar Dec 20 '22 17:12 ljupcho

Thanks, that solve the problem!

alphatroya avatar Jan 01 '23 19:01 alphatroya