You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
675 B

return {
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
event = { "CmdlineEnter" },
ft = { "go", 'gomod' },
build = ':lua require("go.install").update_all_sync()',
config = function()
require("go").setup()
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
require('go.format').goimports()
end,
group = format_sync_grp,
})
end
}