sourcegraph / sg.nvim

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

Lsp doesnt work in sourcegraph opened links #203

Open I-Own-You opened 7 months ago

I-Own-You commented 7 months ago

Hi, really handy plugin

I cant use lsp features in opened source graph links, even the one provided in the example: :e sg://github.com/tjdevries/sam.py/-/src/sam.py

When i try to goto definition i get:

image

When i try to hover, i get:

image

and so on...

tjdevries commented 7 months ago

Can you try opening something more like: https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/internal/conf/auth.go

Also, can you put the output of :checkhealth sg

I-Own-You commented 7 months ago

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

sg.nvim report ~
- Machine: x86_64, sysname: Linux
- OK Valid nvim version: table: 0x7ec138b76010
- OK Found `cargo` (cargo 1.75.0) is executable
-     Use `:SourcegraphDownloadBinaries` to avoid building locally.
- OK Found `sg-nvim-agent`: "/home/mkc/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent"
- OK Found `node` (config.node_executable) is executable.
  Version: '21.6.1'
- OK Found `cody-agent`: /home/mkc/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js
- OK   Authentication setup correctly
- OK     endpoint set to: https://sourcegraph.com
- OK Found correct binary versions: "1.0.8" = "1.0.8"
- OK   Sourcegraph Connection info: {
  access_token_set = true,
  endpoint = "https://sourcegraph.com",
  sg_nvim_version = "1.0.8",
  sourcegraph_version = {
  build = "260733_2024-02-05_5.2-dc4f5a6c1a0c",
  product = "260733_2024-02-05_5.2-dc4f5a6c1a0c"
  }
  }
- To manage your Cody Account, navigate to: https://sourcegraph.com/cody/manage
- OK Cody Account Information: {
  chat_limit = 0,
  chat_usage = 0,
  code_limit = 0,
  code_usage = 4,
  cody_pro_enabled = true,
  username = "I-Own-You"
  }
- OK sg.nvim is ready to run

The go file that you provide does work for me, i can use goto definitions