sourcegraph / sg.nvim

Experimental Sourcegraph + Cody plugin for Neovim
Apache License 2.0
706 stars 46 forks source link

Plugin reporting invalid `nvim` version #255

Open bd-g opened 2 months ago

bd-g commented 2 months ago

I've installed this plugin with the below config on lazyvim

return {
  -- https://github.com/sourcegraph/sg.nvim
  {
    "sourcegraph/sg.nvim",
    dependencies = { 
      "nvim-lua/plenary.nvim", 
      "nvim-telescope/telescope.nvim" 
    },
  },
}

I then login per the directions, and run the health check :checkhealth sg, and get the following output.

sg: require("sg.health").check()

sg.nvim report ~
- Machine: x86_64, sysname: Linux
- ERROR Invalid nvim version. Upgrade to at least 0.10.0. Current version: table: 0x7ff9ca663ad0
- ERROR Invalid nvim version. Upgrade to at least 0.9.4 or nightly

I'm currently on v0.9.5, I'm not sure where the Current version: table: 0x7ff9ca663ad0 is coming from.

$ nvim --version
NVIM v0.9.5

I have a few colleagues who have also installed the plugin and reported similar errors. Let me know any other details you would like, happy to work with you to diagnose the issue

Environment

NixOS 24.05, nvim 0.9.5, lazyvim as my plugin manager.

AndreasHnida commented 1 month ago

I had the exact same error. Upgraded Neovim to 10.0. :checkhealth now runs fine.

It's not sg's fault. It uses the normal nvim-like way of retrieving the version:

https://github.com/sourcegraph/sg.nvim/blob/8bdd4d19da2268072708d5fe18fda9c23e16509d/lua/sg/health.lua#L9