Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pure nvim lua api #120

Open
nanozuki opened this issue Aug 16, 2023 · 1 comment
Open

use pure nvim lua api #120

nanozuki opened this issue Aug 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@nanozuki
Copy link
Owner

Considering that nvim 0.5.0 has been out for quite a while now, maybe it's time to completely refactor the plugin with the lua api

@nanozuki nanozuki added the enhancement New feature or request label Aug 16, 2023
@ilan-schemoul
Copy link
Contributor

Do you mean promoting the use of native apis so for example vim.api.nvim_tabpage_get_number(tab_id) instead of api.get_tab_number ? So deprecating tabby functions that do nothing more than calling nvim APIs ?

It would be good cause for a long time I didn't now many functions such as get_tab_number did nothing more than calling native APIs.

It's problematic because I thought I needed the tabby API for that and many others things. Which made everything more complex because sometimes I need to compute some stuff asynchronously (via jobstart etc.) and so I don't have access to the object line asynchronously for example

Also it made understanding the difference betwen tab id and tab number much harder because tabby is obviously less documented than neovim APIs. So I struggled for a long time understanding how to use things like vim.fn.getcwd. It's as simple as passing it the tab number. You can get the line number with nvim_tabpage_get_number but because there is so much tabby wrapper it was hard to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants