-
-
Notifications
You must be signed in to change notification settings - Fork 299
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
PR #1513 uses the new form of vim.validate
which isn't available in stable release yet.
Error executing vim.schedule lua callback: ....local/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/util.lua:235: opt: expected table, got string
stack traceback:
[C]: in function 'error'
vim/shared.lua: in function 'validate'
....local/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/util.lua:235: in function 'get_offset_encoding'
...m/lazy/lspsaga.nvim/lua/lspsaga/codeaction/lightbulb.lua:110: in function 'render'
...m/lazy/lspsaga.nvim/lua/lspsaga/codeaction/lightbulb.lua:137: in function <...m/lazy/lspsaga.nvim/lua/lspsaga/codeaction/lightbulb.lua:135>
Upstream PR neovim/neovim#30855
Steps to reproduce
Uses on nvim stable version v0.10.3
Expected behavior
No error
This is how I fix in one of the plugin
- vim.validate("config", config, "table", true)
- vim.validate("config.targets", config.targets, "table", true)
- vim.validate("config.additional_targets", config.additional_targets, "table", true)
+ vim.validate({ config = { config, "table" } })
+ vim.validate({
+ ["config.targets"] = { config.targets, { "table", "nil" } },
+ })
+ vim.validate({
+ ["config.additional_targets"] = {
+ config.additional_targets,
+ { "table", "nil" },
+ },
+ })
Neovim version (nvim -v)
NVIM v0.10.3 Build type: RelWithDebInfo LuaJIT 2.1.1731601260
lspsaga commit
Terminal name/version
ghostty
tochamateusz, snirt, huysal, ximon-x and sledigabel
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working