nanozuki / tabby.nvim

A declarative, highly configurable, and neovim style tabline plugin. Use your nvim tabs as a workspace multiplexer!
MIT License
570 stars 20 forks source link

fix render function #76

Closed nanozuki closed 2 years ago

anstadnik commented 2 years ago

E746: Function name does not match script file name: Tabby#RenderTabline On the previous commit it doesn't occur

jonathannerat commented 2 years ago

I think it's because a specific file structure is needed in order to use function names like Folder#FunctionName. I fixed that by removing the # from the function name in plugin/tabby.vim and lua/tabby/tabline.lua:

Diff to apply ```diff diff --git a/lua/tabby/tabline.lua b/lua/tabby/tabline.lua index ec4a19c..4717df2 100644 --- a/lua/tabby/tabline.lua +++ b/lua/tabby/tabline.lua @@ -45,7 +45,7 @@ end function tabline.init() tabline.show_control() - vim.o.tabline = '%!Tabby#RenderTabline()' + vim.o.tabline = '%!TabbyRenderTabline()' vim.cmd([[command! -nargs=1 TabRename lua require('tabby.tab').set_current_name()]]) end diff --git a/plugin/tabby.vim b/plugin/tabby.vim index a0d1843..2318b79 100644 --- a/plugin/tabby.vim +++ b/plugin/tabby.vim @@ -10,6 +10,6 @@ function! TabbyTabline() abort return luaeval("require'tabby'.update()") endfunction -function! Tabby#RenderTabline() abort +function! TabbyRenderTabline() abort return luaeval("require'tabby.tabline'.render()") endfunction ```
nanozuki commented 2 years ago

My mistake was to push the testing code to the repo.