1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 19:48:01 +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" }, { "theHamsta/nvim-dap-virtual-text", event = "VeryLazy" },
-- Go -- Go
{ "ray-x/go.nvim" },
{ {
"ray-x/guihua.lua", "ray-x/go.nvim",
build = "cd lua/fzy && make", dependencies = {
config = function() "ray-x/guihua.lua",
require("guihua.maps").setup({ build = "cd lua/fzy && make",
maps = { close_view = "<C-x>" }, },
}) event = { "CmdlineEnter" },
end, ft = { "go", "gomod" },
}, },
-- Markdown -- Markdown

View File

@ -5,5 +5,9 @@ require("go").setup({
lsp_gofumpt = true, 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.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) vim.api.nvim_exec([[ autocmd BufWritePre *.go :silent! lua require('go.format').goimport() ]], false)