kdheepak/tabline.nvim

Error on startup: -complete used without -nargs

wgurecky opened this issue · 4 comments

Error detected while processing /home/hephaestus/.config/nvim/init.vim:
line 314:
Error executing lua /home/hephaestus/.nvim/plugged/tabline.nvim/lua/tabline.lua:740: Vim(command):E1208: -complete used without -nargs

Thanks for reporting! I’ll look into this.

maybe:

diff --git a/lua/tabline.lua b/lua/tabline.lua
index 426b144..a51aa02 100644
--- a/lua/tabline.lua
+++ b/lua/tabline.lua
@@ -757,7 +757,7 @@ function M.setup(opts)
 
     command! -nargs=* -complete=file TablineTabNew :lua require'tabline'.tab_new(<f-args>)
     command! -nargs=+ -complete=buffer TablineBuffersBind :lua require'tabline'.bind_buffers(<f-args>)
-    command! -complete=buffer TablineBuffersClearBind :lua require'tabline'.clear_bind_buffers()
+    command! -nargs=* -complete=buffer TablineBuffersClearBind :lua require'tabline'.clear_bind_buffers()
 
     function! TablineSwitchBuffer(bufnr, mouseclicks, mousebutton, modifiers)
       execute ":b " . a:bufnr

Looks like this is related to a vim-patch MR in neovim: neovim/neovim#15312

https://github.com/neovim/neovim/pull/15312/files#diff-e8cf5e56e29738d0c1605f75d1b158ea0fae543b45c55e3b721f91dd10ac9b49R5517-R5519

That particular command right now doesn’t accept any arguments actually. So I should just remove the -complete=buffer.

Fixed in latest main branch.