hrsh7th / cmp-cmdline

nvim-cmp source for vim's cmdline
MIT License
493 stars 42 forks source link

Error: expected table, got nil #75

Open tzachar opened 1 year ago

tzachar commented 1 year ago

This is popping up sporadically, usually when trying to write a file by quickly pressing :w<cr> :

Error executing vim.schedule lua callback: vim/shared.lua:0: after the second argument: expected table, got nil                                                               
stack traceback:                                                                                                                                                              
        [C]: in function 'error'                                                                                                                                              
        vim/shared.lua: in function 'validate'                                                                                                                                
        vim/shared.lua: in function 'tbl_deep_extend'                                                                                                                         
        ...e/pack/packer/start/cmp-cmdline/lua/cmp_cmdline/init.lua:165: in function 'complete'                                                                               
        .../nvim/site/pack/packer/start/nvim-cmp/lua/cmp/source.lua:325: in function 'complete'                                                                               
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:279: in function 'callback'                                                                               
        .../nvim/site/pack/packer/start/nvim-cmp/lua/cmp/source.lua:365: in function ''                                                                                       
        vim/_editor.lua: in function <vim/_editor.lua:0>                                                                    
andis-sprinkis commented 1 year ago

I have noticed this happening during editing TSX files when I tap :w<cr>.

I use these completions for ::

    { name = 'cmdline_history' },
    { name = 'cmdline' },
    { name = 'path' },
    { name = 'buffer' },
    { name = 'zsh' },
    { name = 'tmux' },
tzachar commented 1 year ago

I also opened a bug in https://github.com/hrsh7th/nvim-cmp/issues/1397 lately, but am getting nowhere...

kerruba-milkman commented 1 year ago

Having the same issue here