hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.86k stars 393 forks source link

vim.tbl_add_reverse_lookup is deprecated #1947

Closed jackfranklin closed 4 months ago

jackfranklin commented 4 months ago

On the latest Neovim nightly release:

- WARNING vim.tbl_add_reverse_lookup is deprecated. Feature will be removed in Nvim 0.12
  - ADVICE:
    - stack traceback:
        /home/jack/.local/share/nvim/lazy/nvim-cmp/lua/cmp/types/lsp.lua:205
        [C]:-1
        /home/jack/.local/share/nvim/lazy/nvim-cmp/lua/cmp/types/init.lua:4
        [C]:-1
        /home/jack/.local/share/nvim/lazy/nvim-cmp/plugin/cmp.lua:11
        [C]:-1
        vim/_editor.lua:0
        /home/jack/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:485

I am happy to try to figure this out, but reporting in case anyone else beats me to it.

xuwei152 commented 4 months ago

I have solved it in an ugly way by asking GPT to write a code to replace it Clip_2024-05-31_11-36-52

I am looking forward to a more elegant way.

Shougo commented 4 months ago

@jackfranklin @xuwei152

Please update nvim-cmp to the latest version. Because the function is not used anymore.

hrsh7th commented 4 months ago

Thank you. @Shougo

jackfranklin commented 4 months ago

Apologies for the noise, I thought I was up to date but clearly not. Thanks so much!