1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-11-15 09:11:12 +00:00
dotfiles/.config/nvim/lua/plugins/go.lua

13 lines
365 B
Lua
Raw Normal View History

2022-10-01 11:46:18 +00:00
local status_ok, go = pcall(require, "go")
if not status_ok then
return
end
go.setup({
icons = { breakpoint = "", currentpos = "🏃" },
2022-10-14 18:40:51 +00:00
fillstruct = "fillstruct",
2022-10-01 11:46:18 +00:00
})
2022-10-14 18:40:51 +00:00
vim.cmd("autocmd FileType go nmap <Leader>gf :lua require('go.format').goimport()<CR>")
vim.api.nvim_exec([[ autocmd BufWritePre *.go :silent! lua require('go.format').goimport() ]], false)