Skip to content

Commit

Permalink
feat(go)!: move from go.nvim to gopher.nvim (#1059)
Browse files Browse the repository at this point in the history
Co-authored-by: rami3l <[email protected]>
  • Loading branch information
mehalter and rami3l authored Jun 21, 2024
1 parent fd7d0de commit 5adae48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
7 changes: 3 additions & 4 deletions lua/astrocommunity/pack/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 8 additions & 18 deletions lua/astrocommunity/pack/go/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{
Expand All @@ -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,
},
Expand All @@ -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: <https://github.com/ray-x/go.nvim/issues/433>
build = function() require("go.install").update_all() end,
opts = {},
},
{
"nvim-neotest/neotest",
Expand Down

0 comments on commit 5adae48

Please sign in to comment.