tabnine-nvim icon indicating copy to clipboard operation
tabnine-nvim copied to clipboard

Fix deprecation warnings in nvim 0.10

Open aarondill opened this issue 1 year ago • 6 comments
trafficstars

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

  • fix: vim.lsp.buf_get_clients is deprecated
  • fix: vim.loop is deprecated
  • fix: vim.api.nvim_buf_get_option is deprecated

aarondill avatar May 18 '24 04:05 aarondill

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

amirbilu avatar May 22 '24 06:05 amirbilu

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

aarondill avatar May 22 '24 06:05 aarondill

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

amirbilu avatar May 22 '24 18:05 amirbilu

@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

aarondill avatar May 23 '24 01:05 aarondill

Got you

amirbilu avatar May 23 '24 03:05 amirbilu

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

aarondill avatar May 23 '24 07:05 aarondill