diff --git a/vim/.vim/lua/plugins/base.lua b/vim/.vim/lua/plugins/base.lua index 25df3c0..4953aa4 100644 --- a/vim/.vim/lua/plugins/base.lua +++ b/vim/.vim/lua/plugins/base.lua @@ -12,8 +12,12 @@ return { { "nvim-lua/plenary.nvim", lazy = false }, { "squk/java-syntax.vim", ft = "java" }, { "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" }, - { "ray-x/go.nvim", ft = "go" }, - { "ray-x/guihua.lua", ft = "go" }, + { + "ray-x/go.nvim", + ft = "go", + cond = not use_google(), + dependencies = { "ray-x/guihua.lua" }, + }, { "andymass/vim-matchup", event = "VimEnter" }, { "jghauser/mkdir.nvim", event = "BufWritePre" }, -- Session management diff --git a/vim/.vim/lua/plugins/lsp.lua b/vim/.vim/lua/plugins/lsp.lua index 2266fe9..061be25 100644 --- a/vim/.vim/lua/plugins/lsp.lua +++ b/vim/.vim/lua/plugins/lsp.lua @@ -113,15 +113,15 @@ return { capabilities = capabilities, }, }) + local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {}) + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*.go", + callback = function() + require("go.format").goimport() + end, + group = format_sync_grp, + }) end - local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {}) - vim.api.nvim_create_autocmd("BufWritePre", { - pattern = "*.go", - callback = function() - require("go.format").goimport() - end, - group = format_sync_grp, - }) end, }, }