1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 13:58:00 +00:00

[neovim] Update go plugin lazy loading

This commit is contained in:
Daniel Carrillo 2023-04-29 17:09:28 +02:00
parent 36a6e89f25
commit 7f1282053c
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 11 additions and 8 deletions

View File

@ -139,15 +139,14 @@ require("lazy").setup({
{ "theHamsta/nvim-dap-virtual-text", event = "VeryLazy" },
-- Go
{ "ray-x/go.nvim" },
{
"ray-x/guihua.lua",
build = "cd lua/fzy && make",
config = function()
require("guihua.maps").setup({
maps = { close_view = "<C-x>" },
})
end,
"ray-x/go.nvim",
dependencies = {
"ray-x/guihua.lua",
build = "cd lua/fzy && make",
},
event = { "CmdlineEnter" },
ft = { "go", "gomod" },
},
-- Markdown

View File

@ -5,5 +5,9 @@ require("go").setup({
lsp_gofumpt = true,
})
require("guihua.maps").setup({
maps = { close_view = "<C-x>" },
})
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)