From 36dedc36ce36c5dafb7d16a1c2380c05d87ff439 Mon Sep 17 00:00:00 2001 From: serxoz Date: Thu, 28 Jul 2022 14:35:01 +0200 Subject: [PATCH] =?UTF-8?q?cambio=20de=20m=C3=B3dulo=20para=20golang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/after/plugin/go.lua | 5 +++++ nvim/after/plugin/init.lua | 1 + nvim/custom/plugins/init.lua | 8 ++------ nvim/custom/plugins/vim-go.lua | 4 ---- nvim/install.sh | 1 + 5 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 nvim/after/plugin/go.lua create mode 100644 nvim/after/plugin/init.lua delete mode 100644 nvim/custom/plugins/vim-go.lua diff --git a/nvim/after/plugin/go.lua b/nvim/after/plugin/go.lua new file mode 100644 index 0000000..482852d --- /dev/null +++ b/nvim/after/plugin/go.lua @@ -0,0 +1,5 @@ +require('go').setup() +-- Run gofmt + goimport on save +vim.api.nvim_exec([[ autocmd BufWritePre *.go :silent! lua require('go.format').gofmt() ]], false) +vim.api.nvim_exec([[ autocmd BufWritePre *.go :silent! lua require('go.format').goimport() ]], false) + diff --git a/nvim/after/plugin/init.lua b/nvim/after/plugin/init.lua new file mode 100644 index 0000000..2b710a4 --- /dev/null +++ b/nvim/after/plugin/init.lua @@ -0,0 +1 @@ +vim.cmd(":TSInstall all"); diff --git a/nvim/custom/plugins/init.lua b/nvim/custom/plugins/init.lua index 7a6f55e..78dac28 100644 --- a/nvim/custom/plugins/init.lua +++ b/nvim/custom/plugins/init.lua @@ -1,5 +1,4 @@ return { - -- ['nvim-lua/plenary.nvim'] = {}, ['ThePrimeagen/harpoon'] = { module = "harpoon", ft = "harpoon", @@ -7,9 +6,6 @@ return { require "custom.plugins.harpoon" end, }, - ['fatih/vim-go'] = { - config = function() - require "custom.plugins.vim-go" - end, - }, + ['ray-x/go.nvim'] = {}, + ['ray-x/guihua.lua'] = {}, } diff --git a/nvim/custom/plugins/vim-go.lua b/nvim/custom/plugins/vim-go.lua deleted file mode 100644 index 5623314..0000000 --- a/nvim/custom/plugins/vim-go.lua +++ /dev/null @@ -1,4 +0,0 @@ -local M = { - go_gopls_enabled = 0, -} -return M diff --git a/nvim/install.sh b/nvim/install.sh index a2daa02..0ce6d4b 100644 --- a/nvim/install.sh +++ b/nvim/install.sh @@ -5,4 +5,5 @@ rm -rf ~/.local/share/nvim rm -rf ~/.cache/nvim git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 ; nvim ln -s $HOME/dotfiles/nvim/custom $HOME/.config/nvim/lua/custom +ln -s $HOME/dotfiles/nvim/after $HOME/.config/nvim/after