VectorCode icon indicating copy to clipboard operation
VectorCode copied to clipboard

[BUG] NVim extension incorrectly deprecates `vectorcode.cacher.default.async_check`

Open jsmith212 opened this issue 1 year ago • 2 comments

Describe the bug NVim extension claims that vectorcode.cacher.default.async_check is deprecated and encourages usage of vectorcode.cacher.utils.async_check instead, but the vectorcode.cacher.utils module does not exist.

To Reproduce Steps to reproduce the behavior:

  1. Attempt to use vectorcode.cacher.default.async_check in your NVim config
  2. Observe the deprecation warning and update as instructed
  3. Relaunch NVim and note the "module not found" error

Expected behavior Either the existing function is not deprecated (and does not produce a warning) or the new utils module exists so that I can migrate to it.

VectorCode Configuration N/A, not specific to a project.

For issues with the Neovim plugin, please also attach your setup options:

local cacher = require "vectorcode.cacher.default"

local setup = function()
  vim.api.nvim_create_autocmd("LspAttach", {
    callback = function()
      local bufnr = vim.api.nvim_get_current_buf()
      cacher.async_check("config", function()
        cacher.register_buffer(bufnr, {
          n_query = 10,
        })
      end, nil)
    end,
    desc = "Register buffer for VectorCode",
  })
end

return {
  setup = setup,
}

Platform information:

  • If the issue is about the neovim plugin, attach the neovim version you're using: 0.6.10

System Information:

For Mac users, please also mention whether you're using intel or apple silicon devices.

  • Macbook M1 Pro (Apple Silicon)

jsmith212 avatar May 29 '25 16:05 jsmith212

The correct API would be require("vectorcode.cacher").utils.async_check(). I'll update the deprecation notice to make it clearer.

Davidyz avatar May 31 '25 08:05 Davidyz

That worked, thanks for the help!

jsmith212 avatar May 31 '25 19:05 jsmith212