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