-
Notifications
You must be signed in to change notification settings - Fork 12
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
bug: Error executing vim.schedule lua callback: .../.local/share/nvim/lazy/lazydev.nvim/lua/lazydev/buf.lua:151: bad argument #1 to 'ipairs' (table expected, got nil) #10
Comments
Should be fixed, but would be great if you can confirm! |
Just removed that debug. |
What does |
I think this is the problem: https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/lua_ls.lua#L22 Your LuaLS is in single file mode, no workspace. When you create the lua folder, you're in a workspace. |
Although, even in that case it still works for me.... |
Empty table Lazy.use {
"folke/lazydev.nvim",
-- dir = "~/dev/open-sos/lazydev.nvim",
dependencies = {{ "bilal2453/luvit-meta" }},
ft = "lua",
opts = {
library = { "luvit-meta/library" }
},
init = function()
local luadir = vim.fn.expand("~/.config/nvim/lua/")
if not vim.loop.fs_stat(luadir) then
vim.fn.mkdir(luadir)
end
end
} This is my require("lspconfig").lua_ls.setup({
capabilities = LSP.capabilities(),
settings = {
Lua = {
format = { enable = true },
runtime = { version = "LuaJIT" },
diagnostics = { globals = { "vim" } },
completion = { callSnippet = "Replace" },
workspace = { checkThirdParty = "Disable" }
}
}
}) |
And this? |
Should work now with single file support |
It is working now. Thank you! |
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10
Operating system/version
Arch Linux 6.9.3-arch1-1
Describe the bug
The plugin throws error when starting with
nvim ~/.config/nvim/init.lua
, but it works correctly when I am editing theinit.lua
in my repository directory. I think it throws when there isn't a lua directory e.g.~/.config/nvim/lua/
, e.g. when you have only singleinit.lua
file there. Here is the error.Steps To Reproduce
rm -r ~/.config/nvim/lua/
nvim ~/.config/nvim/init.lua
Expected Behavior
To not throw error and to work correctly.
Repro
The text was updated successfully, but these errors were encountered: