Encountering errors when using minimal examples
ldaniluk opened this issue · comments
Hello, first: thanks for great plugin.
I have experienced following error:
Error executing Lua callback: ...vim/plugged/commander.nvim/lua/commander/model/Layer.lua:211: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
...vim/plugged/commander.nvim/lua/commander/model/Layer.lua:211: in function 'validate_cache'
...vim/plugged/commander.nvim/lua/commander/model/Layer.lua:92: in function 'get_commands'
...d/commander.nvim/lua/telescope/_extensions/commander.lua:20: in function <...d/commander.nvim/lua/telescope/_extensions/commander.lua:18>
...re/nvim/plugged/telescope.nvim/lua/telescope/command.lua:199: in function 'run_command'
...re/nvim/plugged/telescope.nvim/lua/telescope/command.lua:259: in function 'load_command'
...l/share/nvim/plugged/telescope.nvim/plugin/telescope.lua:108: in function <...l/share/nvim/plugged/telescope.nvim/plugin/telescope.lua:107>
When my config for commander was like this:
local command_center = require("commander")
command_center.add({{
desc = "get github url to current line",
cmd = '<CMD>lua require"gitlinker".get_buf_range_url()<CR>',
}})
(I have used this plugin named as command_center and didn't update variable name)
In order to make it work I have had to add any setup() call, this suffices:
command_center.setup({})
It only breaks when opening the commander telescope window but does not break using keys
associated with commands.
I am using these versions (latest at this moment)
silent! let g:plugs['telescope.nvim'].commit = '6213322ab56eb27356fdc09a5078e41e3ea7f3bc'
silent! let g:plugs['commander.nvim'].commit = 'cef3cf34dc478b2cc27e72fb592690cba718a091'
fixed in 9febde3