nanozuki / tabby.nvim

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

Backwards compatibility #83

Closed stevenocchipinti closed 1 year ago

stevenocchipinti commented 1 year ago

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?

nanozuki commented 1 year ago

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.

stevenocchipinti commented 1 year ago

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")
nanozuki commented 1 year ago

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.

nanozuki commented 1 year ago

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

stevenocchipinti commented 1 year ago

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 πŸ‘