codota / tabnine-nvim

Tabnine Client for Neovim
https://tabnine.com
342 stars 31 forks source link

Fix deprecation warnings in nvim 0.10 #170

Closed aarondill closed 4 months ago

aarondill commented 4 months ago

This fixes several deprecation warnings in nvim 0.10. It should still work in previous versions.

amirbilu commented 4 months ago

@aarondill thanks for the contribution. Was it tested on previous versions?

aarondill commented 4 months ago

I've tested everything except for the chat changes (which should still work) on NVIM v0.9.5 built from source, as well as NVIM v0.11.0-dev-49+g10601ac5f (latest HEAD). I don't use the chat, and I don't want to go through the trouble of making it work on my machine. If you'd like to test it, feel free, but vim.bo has existed since at least NVIM v0.5.0 (see https://github.com/neovim/neovim/commit/43956dea55a49a847a0f2e5d9e0f48384cb34635 where it is already included in the docs).

Obviously the change in the readme is not backwards compatible, so older users still need to change it back to vim.loop. I can add a note if you'd like, but I think it's fine with vim.uv

amirbilu commented 4 months ago

Can you elaborate on needed in readme? Not sure I got this point

aarondill commented 4 months ago

@amirbilu In the README, I changed the reference to vim.loop.os_uname() to vim.uv.os_uname() for the "platform dependant build script". If one were to copy that code and use it before nvim 0.10.0, it would error. If you want, I can add a note in the readme saying this and telling anyone running pre-0.10 to replace vim.uv with vim.loop

amirbilu commented 4 months ago

Got you

aarondill commented 4 months ago

@amirbilu I added the note to the readme in 84768b05e71bc8b1bc11f143dad63da95bd34eb7