Skip to content

bug: bad argument #1 to 'find' (string expected, got table) #500

@auxym

Description

@auxym

Neovim version (nvim -v)

0.11.5

Operating system/version

Windows 11

Output of :AerialInfo

Aerial Info

Filetype: matlab
Configured backends:
lsp (supported) (attached)
treesitter (not supported) [No queries defined for 'matlab']
markdown (not supported) [Filetype is not markdown]
man (not supported) [Filetype is not man]
Show symbols: all symbols

Describe the bug

Not sure if this is a weird interaction between plugins, I am using AstroNvim. I keep getting this error, everytime I make an edit in a buffer:

Error executing vim.schedule lua callback: ...a/lazy/aerial.nvim/lua/aerial/backends/lsp/callbacks.lua:62: bad argument
#1 to 'find' (string expected, got table)
stack traceback:
        [C]: in function 'find'
        ...a/lazy/aerial.nvim/lua/aerial/backends/lsp/callbacks.lua:62: in function 'process_symbols'
        ...a/lazy/aerial.nvim/lua/aerial/backends/lsp/callbacks.lua:136: in function 'handle_symbols'
        ...a/lazy/aerial.nvim/lua/aerial/backends/lsp/callbacks.lua:186: in function 'fn'
        vim/_editor.lua:615: in function 'fn'
        vim/_editor.lua:366: in function <vim/_editor.lua:365>

What is the severity of this bug?

blocking (cannot use plugin)

Steps To Reproduce

  1. Open a buffer
  2. Enter insert mode
  3. Escape (exit insert mode)
  4. Error pops up

Expected Behavior

Can edit buffers without error.

Minimal example file

No response

Minimal init.lua

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "stevearc/aerial.nvim",
    config = function()
      require("aerial").setup({
        -- add your aerial config here
      })
    end,
  },
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function()
      require("nvim-treesitter.configs").setup({
        ensure_installed = { "c", "lua" },
        auto_install = true,
        highlight = { enable = true },
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions