Skip to content

Error: attempt to index local 'self' (a nil value) when virtual_text is enabled #298

@shubham-1827

Description

@shubham-1827

Hi! I'm encountering a runtime error when enabling the virtual_text feature in windsurf.nvim. Everything works fine with the cmp_source only, but as soon as I enable virtual text, it breaks with the following error:

Error detected while processing InsertEnter Autocommands for "*":
Error executing lua callback: ....local/share/nvim/lazy/windsurf.nvim/lua/codeium/api.lua:315: attempt to index local 'self' (a nil value)
stack traceback:
  ....local/share/nvim/lazy/windsurf.nvim/lua/codeium/api.lua:315: in function 'is_healthy'
  ...are/nvim/lazy/windsurf.nvim/lua/codeium/virtual_text.lua:487: in function 'debounced_complete'
  ...are/nvim/lazy/windsurf.nvim/lua/codeium/virtual_text.lua:45: in function <...>

Neovim version : v0.11.0
Plugin Manager : Lazy.nvim
OS : WSL 2 Ubuntu

🔧 Minimal Config to Reproduce:

return {
  "Exafunction/windsurf.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "hrsh7th/nvim-cmp",
  },
  config = function()
    require("codeium").setup({
      virtual_text = {
        enabled = true,
      },
    })
  end,
}

Suspected Cause :
The error seems to originate from api.lua:315 where a method might be calling self without being bound correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions