nanozuki/tabby.nvim

Backwards compatibility

Closed this issue Β· 5 comments

Hello,

Thanks for the Tabby plugin πŸ™

I created a custom tabline in my config but it no longer works with v2.
I do plan on upgrading to v2 eventually but I saw the readme mentions:

Tabby thinks it's essential to stay backward compatible! So even if Tabby releases a brand new 2.0, it will not break the 1.0 configuration.

I thought I might be missing something simple so until I have the time to learn the new API and upgrade my code, is there an easy way to make my config work with the new version?
Or should I just lock the plugin to v1 until I update my tabline code?

Thanks?

Is there an easy way to make my config work with the new version?

"stay backward compatible" means the new version won't break your config. The config for v1.x works in v2.x, so you don't need to do anything after you upgrade tabby.nvim.

If you find any issue after the upgrade, Itβ€˜s a bug and should be fixed.

I get the following error from my config:

tabby.lua:62: attempt to call field 'get_current_win' (a nil value)

This was coming from:

local focus_win = tab.get_current_win(tabid)

I still need to investigate further but it seems like these modules API may have changed?

local tab = require("tabby.tab")
local win = require("tabby.win")

Oh, that function is not present in the README, I think no one uses it. I Only remain the function "public" in README.

After I read the difference in code, I think this is important for V1.x users. I'll fix it.

Fix in #84, and merged, you can check it.

Wow, thank you! πŸ™
That's quite a commitment to maintain backwards compatibility, much appreciated πŸ™‚

I'll eventually try out the new API, but everything is working for now πŸ‘