@ -24,12 +24,6 @@ local goimport_args = _GO_NVIM_CFG.goimport_args
'--base-formatter=goimports',
}
ifvim.lsp.buf.format==nilthen
-- vim.notify('the vim.lsp.buf.format is not available, some feature is missing if you are running old version of neovim (<0.8.0)', vim.log.levels.DEBUG)
-- neovim < 0.7 only
require('go.lsp')-- this set default value of format
end
localM={}
M.lsp_format=function()
vim.lsp.buf.format({
@ -49,6 +43,7 @@ end
localrun=function(fmtargs,bufnr,cmd)
bufnr=bufnrorvim.api.nvim_get_current_buf()
log(fmtargs,bufnr,cmd)
cmd=cmdor_GO_NVIM_CFG.gofmtor'gofumpt'
ifvim.o.mod==truethen
vim.cmd('noautocmd write')
end
@ -65,11 +60,7 @@ local run = function(fmtargs, bufnr, cmd)