Make lsp_on_attach nil by default (#62)

Clarify lsp_on_attach in the docs.
pull/63/head
Craig Rodrigues 2 years ago committed by GitHub
parent f53e130370
commit eebe136396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -402,9 +402,9 @@ require('go').setup({
-- if lsp_cfg is a table, merge table with with non-default gopls setup in go/lsp.lua, e.g.
-- lsp_cfg = {settings={gopls={matcher='CaseInsensitive', ['local'] = 'your_local_module_path', gofumpt = true }}}
lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt
lsp_on_attach = false, -- true: use on_attach function defined in go/lsp.lua
-- false: do nothing
-- if lsp_on_attach is a function: use this function as on_attach function for gopls
lsp_on_attach = nil, -- nil: use on_attach function defined in go/lsp.lua,
-- when lsp_cfg is true
-- if lsp_on_attach is a function: use this function as on_attach function for gopls
lsp_codelens = true, -- set to false to disable codelens, true by default
gopls_remote_auto = true, -- add -remote=auto to gopls
gopls_cmd = nil, -- if you need to specify gopls path and cmd, e.g {"/home/user/lsp/gopls", "-logfile","/var/log/gopls.log" }

@ -261,9 +261,13 @@ You can setup go.nvim with following options:
icons = { breakpoint = "🧘", currentpos = "🏃" },
verbose = false,
log_path = vim.fn.expand("$HOME") .. "/tmp/gonvim.log",
lsp_cfg = false, -- true: apply go.nvim non-default gopls setup
lsp_cfg = false, -- false: do nothing
-- true: apply non-default gopls setup defined in go/lsp.lua
-- if lsp_cfg is a table, merge table with with non-default gopls setup in go/lsp.lua, e.g.
lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt
lsp_on_attach = nil, -- provides a on_attach function to gopls, will use go.nvim on_attach if nil
lsp_on_attach = nil, -- nil: do nothing
-- if lsp_on_attach is a function: use this function as on_attach function for gopls,
when lsp_cfg is true
lsp_diag_hdlr = true, -- hook lsp diag handler
lsp_codelens = true,
gopls_remote_auto = true,

@ -11,9 +11,14 @@ _GO_NVIM_CFG = {
icons = { breakpoint = "🧘", currentpos = "🏃" },
verbose = false,
log_path = vim.fn.expand("$HOME") .. "/tmp/gonvim.log",
lsp_cfg = false, -- true: apply go.nvim non-default gopls setup
lsp_cfg = false, -- false: do nothing
-- true: apply non-default gopls setup defined in go/lsp.lua
-- if lsp_cfg is a table, merge table with with non-default gopls setup in go/lsp.lua, e.g.
lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt
lsp_on_attach = false, -- provides a on_attach function to gopls, will use go.nvim on_attach if nil
lsp_on_attach = nil, -- nil: use on_attach function defined in go/lsp.lua for gopls,
-- when lsp_cfg is true
-- if lsp_on_attach is a function: use this function as on_attach function for gopls,
-- when lsp_cfg is true
lsp_diag_hdlr = true, -- hook lsp diag handler
lsp_codelens = true,
gopls_remote_auto = true,

Loading…
Cancel
Save