Skip to content

userdata completion error with glsl_analyzer LSP #2456

@ErikReider

Description

@ErikReider

Make sure you have done the following

  • Updated to the latest version of blink.cmp
  • Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

Happens when trying to use the completions within a GLSL file. There seems to be a change in nvim 0.12 where the lsp event items are nullable. I previously had to fix this in nvim-cmp #2217

Here's the glsl_analyzer issue and here's the stack traceback:

vim.schedule callback: ....cmp/lua/blink/cmp/completion/windows/render/context.lua:63: attempt to index a userdata value
stack traceback:
        ....cmp/lua/blink/cmp/completion/windows/render/context.lua:63: in function 'new'
        ....cmp/lua/blink/cmp/completion/windows/render/context.lua:33: in function 'get_from_items'
        ...ink.cmp/lua/blink/cmp/completion/windows/render/init.lua:96: in function 'draw'
        ...lazy/blink.cmp/lua/blink/cmp/completion/windows/menu.lua:75: in function 'open_with_items'
        ...re/nvim/lazy/blink.cmp/lua/blink/cmp/completion/init.lua:75: in function 'callback'
        .../nvim/lazy/blink.cmp/lua/blink/cmp/lib/event_emitter.lua:28: in function 'emit'
        ...re/nvim/lazy/blink.cmp/lua/blink/cmp/completion/list.lua:117: in function 'show'
        ...re/nvim/lazy/blink.cmp/lua/blink/cmp/completion/init.lua:58: in function <...re/nvim/lazy/blink.cmp/lua/blink/cmp/completion/init.lua:34>

Relevant configuration

sources = {
  default = { "lsp" }
}

neovim version

NVIM v0.12.0-dev+2689-929f03fa8

blink.cmp version

7c9777b

Metadata

Metadata

Assignees

No one assigned

    Labels

    LSPRelated to a specific LSPbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions