expected table, got nil
sibouras opened this issue · comments
sibouras commented
my config is just calling the setup function and when start nvim i get this error
E5113: Error while calling lua chunk: ...packer\start\live-command.nvim/lua\live-command\init.lua:309: commands: expected table, got nil
stack traceback:
[C]: in function 'error'
vim/shared.lua:699: in function 'validate'
...packer\start\live-command.nvim/lua\live-command\init.lua:309: in function 'validate_config'
...packer\start\live-command.nvim/lua\live-command\init.lua:346: in function 'setup'
...ers\marzouk\AppData\Local\nvim/lua\user\live-command.lua:13: in main chunk
[C]: in function 'require'
C:\Users\marzouk\AppData\Local\nvim\init.lua:31: in main chunk
Jonas Strittmatter commented
This is currently expected behavior since commands
must not be nil
. You need to pass every command you want to preview to the setup function, e.g.
require("live-command").setup {
commands = {
Norm = { cmd = "norm" }
},
}
sibouras commented
i tried that config and i got another error
E5113: Error while calling lua chunk: ...packer\start\live-command.nvim/lua\live-command\init.lua:359: attempt to index field 'defaults' (a nil value)
stack traceback:
...packer\start\live-command.nvim/lua\live-command\init.lua:359: in function 'setup'
...ers\marzouk\AppData\Local\nvim/lua\user\live-command.lua:13: in main chunk
[C]: in function 'require'
C:\Users\marzouk\AppData\Local\nvim\init.lua:31: in main chunk
sibouras commented
defaults = {
debug = false,
},
followed the error and the user config needs to have debug=false so line 359 doesn't error
Jonas Strittmatter commented
Thanks for letting me know, that's also fixed now :)