AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.04k stars 212 forks source link

Go pack have inccorect config #1044

Closed nfort closed 2 weeks ago

nfort commented 2 weeks ago

Describe the bug

Inccorect config

Steps to Reproduce

  1. Try command :GoRun
  2. Get some errors

Expected behavior

Run command

Screenshots

No response

Additional Context

i create issue https://github.com/ray-x/go.nvim/issues/474 and after research determine problem with https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/pack/go/init.lua

  {
    "ray-x/go.nvim",
    dependencies = {
      "ray-x/guihua.lua",
      "neovim/nvim-lspconfig",
      "nvim-treesitter/nvim-treesitter",
    },
    opts = {
      disable_defaults = true,
      diagnostic = false,
    },
    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,
  },

it fixed config after change to

  {
    "ray-x/go.nvim",
    dependencies = {
      "ray-x/guihua.lua",
      "neovim/nvim-lspconfig",
      "nvim-treesitter/nvim-treesitter",
    },
    opts = {
      disable_defaults = true,
      diagnostic = false,
    },
    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,
  },
Uzaaft commented 2 weeks ago

There is no difference between those two

Uzaaft commented 2 weeks ago

@nfort Please fill out the issue template when providing an bug report, including what the error is, and the minimal configuration. Closing this since it wasn't provided.

dontmindmexdd commented 1 week ago

I've encountered this issue too, but I can elaborate further.

Right now, disable_defaults is being set to true, which purges all setting tables of go.nvim. The documentation states that if disable_defaults is set, you should manually configure all the settings. This manual configuration is not being done, which in turn causes go.nvim to error out on config. Overriding the disable_defaults flag to false fixes the issue for me.

image
Uzaaft commented 1 week ago

Honestly at this point, I'm more eager to just purge go.nvim