Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to index field 'kinds' (a nil value) #222

Closed
mhanberg opened this issue Nov 14, 2022 · 3 comments · Fixed by #639
Closed

attempt to index field 'kinds' (a nil value) #222

mhanberg opened this issue Nov 14, 2022 · 3 comments · Fixed by #639
Labels
bug Something isn't working

Comments

@mhanberg
Copy link

Describe the bug
When I boot neovim, I am usually presented with the following error

Which version of Neovim are you using?

NVIM v0.9.0-dev-305+g9d7dc5062
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/Users/runner/work/neovim/neovim/build/cmake.config -I/Users/runner/work/neovim/neovim/src -I/Users/runner/work/neovim/neovim/.deps/usr/include -I/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Frameworks/Mono.framework/Headers -I/Users/runner/work/neovim/neovim/build/src/nvim/auto -I/Users/runner/work/neovim/neovim/build/include
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

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

Run :checkhealth for more info

To Reproduce
Steps to reproduce the behavior:

  1. nvim .
  2. open a file (I opened an elixir file, which may mean that LSP stuff is related)
  3. see error

Expected Behavior

I would expect no error

Noice Log
Please include any related errors from the Noice log file. (open with :Noice log)

Noice log
Sun Nov 13 20:09:40 2022
...e/pack/packer/start/noice.nvim/lua/noice/lsp/message.lua:30: attempt to index field 'kinds' (a nil value)

stack traceback:
[C]: in function 'pcall'
...ite/pack/packer/start/noice.nvim/lua/noice/util/call.lua:144: in function '__index'
...e/pack/packer/start/noice.nvim/lua/noice/lsp/message.lua:30: in function <...e/pack/packer/start/noice.nvim/lua/noice/lsp/message.lua:24>
[C]: in function 'xpcall'
...ite/pack/packer/start/noice.nvim/lua/noice/util/call.lua:149: in function 'handler'
...stalls/neovim/nightly/share/nvim/runtime/lua/vim/lsp.lua:1054: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

Config

I have the following in config/nvim/plugin/noice.lua

require("noice").setup {
  cmdline = {
    enabled = true, -- disable if you use native command line UI
    view = "cmdline_popup", -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
    opts = { buf_options = { filetype = "vim" } }, -- enable syntax highlighting in the cmdline
    icons = {
      ["/"] = { icon = "" },
      ["?"] = { icon = "" },
      [":"] = { icon = ":", firstc = false },
    },
  },
  views = {
    cmdline_popup = {
      position = {
        row = 1,
        col = "50%",
      },
    },
  },
  routes = {
    {
      filter = {
        event = "msg_show",
        kind = "search_count",
      },
      opts = { skip = true },
    },
    {
      filter = {
        event = "msg_show",
        kind = "",
        find = "written",
      },
      opts = { skip = true },
    },
  },
}
@kapral18
Copy link

kapral18 commented Jun 4, 2024

@folke similar error is happening for me now

image

@folke
Copy link
Owner

folke commented Jun 4, 2024

Just fixed it

@kapral18
Copy link

kapral18 commented Jun 4, 2024

@folke I see the fix thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants