ray-x / go.nvim

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

New? enable: expected boolean, got number #470

Closed elijahmorg closed 1 month ago

elijahmorg commented 1 month ago

I restarted my VM today and now I get this on every go file all the time...

Error executing vim.schedule lua callback: ...m/2823/usr/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:408: enable: expected boolean, got number
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        ...m/2823/usr/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:408: in function 'enable'
        ...elimorga/.local/share/nvim/lazy/go.nvim/lua/go/inlay.lua:332: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

I am using a fairly straightforward kickstart config.

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

https://github.com/elijahmorg/kickstart.nvim/blob/elijah/lua/custom/plugins/go.lua

nvim info

NVIM v0.10.0
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Compilation: /usr/bin/cc -O2 -g -Og -g -flto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always  -DUNIT_TESTING -DHAVE_UNIBILIUM -D_GNU_SOURCE -DINCLUDE_GENERATED_DECLARATIONS -I/build/nvim/parts/nvim/build/.deps/usr/include/luajit-2.1 -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include -I/build/nvim/parts/nvim/build/build/cmake.config -I/build/nvim/parts/nvim/build/src -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
ray-x commented 1 month ago

looking the error. seems to me the version of go.nvim is old. Could you Lazy update the go.nvim and check if the issue resolved after update?

elijahmorg commented 1 month ago

Yeah. I thought I had updated everything and forgot Lazy and Treesitter update independently. Thanks and sorry for the noise.