nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.02k stars 462 forks source link

Migrate `vim.loop` to `vim.uv` #1111

Open hinell opened 12 months ago

hinell commented 12 months ago

See neovim/neovim/pull/22846

Affected files:

lua/lualine/components/branch/git_branch.lua
lua/lualine/components/hostname.lua
lua/lualine/utils/utils.lua

Please, keep these vim.loop.* calls by condition using has("nvim-0.9") == 1 to ensure backwards compatibility

clason commented 11 months ago

What is the point of this issue? vim.loop will not be removed anytime soon, so there's zero need to change anything here.

clason commented 11 months ago

Obviously we will remove it at some point, but that point is far off -- there isn't even a formal deprecation notice for it in 0.10. So both the request in your issue title and the concern in your issue body (which are contradictory, btw) are very premature.

hinell commented 11 months ago

@clason Is there specific neovim policy on features removal?

Recently, I've wasted 3 hours fixing lsp.get_active_clients() calls in my lsp-timeout.nvim plugin.. Just want to ensure that my plugin setup is stable.

I've seen previously statements like this one, so I thought that it might get removed in the next few versions: https://github.com/neovim/neovim/blob/c49cfd89fdd32d670c484b0b677bc8647e891a12/runtime/lua/vim/lsp.lua#L2069-L2072

the request in your PR title he concern in your PR bod

This is not PR, consider this as a tracking issue.

clason commented 11 months ago

It will get removed in a future version, but not in the next one (or the one after that). So this issue is premature.

(Also, why did you fix these calls? They will still work fine in 0.10; the notice will be added in 0.11 and only removed in 0.12. That's year(s) away.)

hinell commented 11 months ago

Also, why did you fix these calls?

Backwards compatibility. Some package registries still ship old nvim. I'm using nightly version though, but anyway...

Checkout my plugin btw, you will love it.