ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
1.91k stars 119 forks source link

Lazy nil value call of 'inlay_hint' #397

Closed ysomad closed 8 months ago

ysomad commented 8 months ago

Hi! Getting error after fresh install of go.nvim via lazy.nvim.

Error getting on opening .go files:

Error executing vim.schedule lua callback: ...s/ysomad/.local/share/nvim/lazy/go.nvim/lua/go/inlay.lua:312: attempt to call field 'inlay_hint' (a nil value)
stack traceback:
        ...s/ysomad/.local/share/nvim/lazy/go.nvim/lua/go/inlay.lua:312: in function 'cb'
        vim/_editor.lua:325: in function <vim/_editor.lua:324>

Neovim version:

$ nvim --version
NVIM v0.10.0-dev-592+ge0453d7f5-Homebrew
Build type: Release
LuaJIT 2.1.1697887905

Lazy config (default from readme)

return {
  "ray-x/go.nvim",
  dependencies = {
    "neovim/nvim-lspconfig",
    "nvim-treesitter/nvim-treesitter",
  },
  config = function()
    require("go").setup()
  end,
  event = {"CmdlineEnter"},
  ft = {"go", 'gomod'},
  build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
}
ray-x commented 8 months ago

This looks like the nvim nightly is too old. Would you change to a more recent version?

ysomad commented 8 months ago

I don't think I can, it's recent version from head installed via homebrew

ray-x commented 8 months ago

I think it has been there for months

image
ray-x commented 8 months ago

Alternatively, you can use nvim 0.9.x release version

ysomad commented 8 months ago

With release version it works