Update reftool and fillstruct
This commit is contained in:
parent
7feb745e6c
commit
569e8e4320
@ -337,6 +337,7 @@ require('go').setup({
|
||||
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",
|
||||
fillstruct = 'gopls', -- can be nil (use fillstruct, slower) and gopls
|
||||
"/var/log/gopls.log" }
|
||||
lsp_diag_hdlr = true, -- hook lsp diag handler
|
||||
dap_debug = true, -- set to false to disable dap
|
||||
|
@ -2,7 +2,7 @@
|
||||
local go = {}
|
||||
_GO_NVIM_CFG = {
|
||||
goimport = 'gopls', -- if set to 'gopls' will use gopls format, also goimport
|
||||
-- fillstruct = 'gopls',
|
||||
fillstruct = 'gopls',
|
||||
gofmt = 'gofumpt', -- if set to gopls will use gopls format
|
||||
max_line_len = 120,
|
||||
tag_transform = false,
|
||||
|
@ -36,6 +36,7 @@ local function fill(cmd)
|
||||
end
|
||||
require("go.install").install(cmd)
|
||||
|
||||
log(cmd)
|
||||
local file = fn.expand("%:p")
|
||||
local line = fn.line(".")
|
||||
local run = string.format("%s -file=%s -line=%d 2>/dev/null", cmd, file, line)
|
||||
@ -93,6 +94,8 @@ function reftool.fixplurals()
|
||||
})
|
||||
end
|
||||
|
||||
reftool.fillswitch = fill('fillswitch')
|
||||
reftool.fillswitch = function()
|
||||
fill('fillswitch')
|
||||
end
|
||||
|
||||
return reftool
|
||||
|
Loading…
Reference in New Issue
Block a user