sourcegraph / sg.nvim

Experimental Sourcegraph + Cody plugin for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SourcegraphLink doesnt work

I-Own-You opened this issue · comments

Hi again!

when i try to use :SourcegraphLink in my repo, i get this error:

image

What does :version say for your nvim?

What does :version say for your nvim?

:version

NVIM v0.9.5                                                                                                                          
Build type: Release                                                                                                                  
LuaJIT 2.1.1702233742

I have been seeing this recently as well:

:version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.170335837
sg: require("sg.health").check()

sg.nvim report ~
- Machine: x86_64, sysname: Darwin
- OK Valid nvim version: table: 0x010b29fde8
- WARNING Unable to find valid cargo executable. Trying to build sg.nvim locally will fail. Instead use `:SourcegraphDownloadBinaries`
- OK Found `sg-nvim-agent`: "/Users/rbattaglia/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent"
- OK Found `node` (config.node_executable) is executable.
  Version: '18.19.0'
- OK Found `cody-agent`: /Users/rbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js
- OK   Authentication setup correctly
- OK     endpoint set to: https://indeed.sourcegraph.com
- OK Found correct binary versions: "1.0.8" = "1.0.8"
- OK   Sourcegraph Connection info: {
  access_token_set = true,
  endpoint = "https://indeed.sourcegraph.com",
  sg_nvim_version = "1.0.8",
  sourcegraph_version = {
  build = "5.2.6",
  product = "5.2.6"
  }
  }
- To manage your Cody Account, navigate to: https://sourcegraph.com/cody/manage
- OK Cody Account Information: {
  cody_pro_enabled = false,
  username = "rbattaglia"
  }
- OK sg.nvim is ready to run

I changed in my lazy-lock to commit cb5c6e9 and it began working again, and 5862b22 it breaks

I have barely written any lua in my life, but my LSP says vim.region param 1 and param 2 are expected integer[], while we are passing strings.
vim-region-lsp-warning

I'd provide a link to the exact line, but my handy dandy :SourcegraphLink isn't working ;)

I guess those are special characters which resolve to start of visual selection and end of visual selection respectively.

I am not sure why this is broken for me, I have tried on mac and ubuntu:

NVIM v0.9.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/__w/neovim/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/build/src/nvim/auto -I/__w/neovim/neovim/build/include -I/__w/neovim/neovim/build/cmake.config -I/__w/neovim/neovim/src -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include

   system vimrc file: /sysinit.vim
  fall-back for : /__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim

Run :checkhealth for more info

In any case, I created #206 for when vim.region fails