From 5adae485bb20927859aa5f8be300cfd9fd219705 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 21 Jun 2024 09:12:24 -0400 Subject: [PATCH] feat(go)!: move from `go.nvim` to `gopher.nvim` (#1059) Co-authored-by: rami3l --- lua/astrocommunity/pack/go/README.md | 7 +++---- lua/astrocommunity/pack/go/init.lua | 26 ++++++++------------------ 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/lua/astrocommunity/pack/go/README.md b/lua/astrocommunity/pack/go/README.md index 6c3d03ac7..047d04a82 100644 --- a/lua/astrocommunity/pack/go/README.md +++ b/lua/astrocommunity/pack/go/README.md @@ -6,11 +6,10 @@ This plugin pack does the following: - Adds `go` Treesitter parsers - Adds `gopls` language server -- Adds the following `null-ls` sources: - - [gofumpt](https://github.com/mvdan/gofumpt) - - [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports) +- Adds the following go packages: - [gomodifytags](https://github.com/fatih/gomodifytags) + - [gotests](https://github.com/cweill/gotests) - [iferr](https://github.com/koron/iferr) - [impl](https://github.com/josharian/impl) - Adds [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) for debugging -- Adds [go.nvim](https://github.com/ray-x/go.nvim) for language specific tools +- Adds [gopher.nvim](https://github.com/olexsmir/gopher.nvim) for language specific tools diff --git a/lua/astrocommunity/pack/go/init.lua b/lua/astrocommunity/pack/go/init.lua index 5dfa33455..d09be6485 100644 --- a/lua/astrocommunity/pack/go/init.lua +++ b/lua/astrocommunity/pack/go/init.lua @@ -70,10 +70,8 @@ return { "jay-babu/mason-null-ls.nvim", optional = true, opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique( - opts.ensure_installed, - { "gomodifytags", "gofumpt", "iferr", "impl", "goimports" } - ) + opts.ensure_installed = + require("astrocore").list_insert_unique(opts.ensure_installed, { "gomodifytags", "iferr", "impl", "gotests" }) end, }, { @@ -89,7 +87,7 @@ return { opts = function(_, opts) opts.ensure_installed = require("astrocore").list_insert_unique( opts.ensure_installed, - { "delve", "gopls", "gomodifytags", "gofumpt", "iferr", "impl", "goimports" } + { "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl" } ) end, }, @@ -109,22 +107,14 @@ return { opts = {}, }, { - "ray-x/go.nvim", + "olexsmir/gopher.nvim", + ft = "go", dependencies = { - "ray-x/guihua.lua", - "neovim/nvim-lspconfig", + "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", + { "williamboman/mason.nvim", optional = true }, -- by default use Mason for go dependencies }, - opts = { - disable_defaults = true, - diagnostic = false, - go = "go", - }, - event = { "CmdlineEnter" }, - ft = { "go", "gomod" }, - -- Prevents Neovim from freezing on plugin installation/update. - -- See: - build = function() require("go.install").update_all() end, + opts = {}, }, { "nvim-neotest/neotest",