Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:e <sourcegraph URL> not working #249

Open
julienTraversier opened this issue Jun 27, 2024 · 1 comment
Open

:e <sourcegraph URL> not working #249

julienTraversier opened this issue Jun 27, 2024 · 1 comment

Comments

@julienTraversier
Copy link

julienTraversier commented Jun 27, 2024

:e doesn't work,

in lsp log :

[sg-nvim-agent] failed to read message data did not match any variant of untagged enum Message\n" ["stderr" 'Recieved a message: Request { id: 2, data: SourcegraphRemoteURL { path: "/home/toto/workspaces/project/" } }\nDATA : SourcegraphRemoteURL { path: "/home/jtraversier/workspaces/project/" }\n' [ERROR][2024-06-27 16:09:22] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\\n at Timeout._onTimeout (/home/toto/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\\n at listOnTimeout (node:internal/timers:569:17)\\n at process.processTimers

the command open a doctype html file (probably the request ?)

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

sg.nvim report ~

  • Machine: x86_64, sysname: Linux
  • OK Valid nvim version: 0.10.0-dev+g27fb62988
  • OK Found cargo (cargo 1.75.0 (1d8b05cdd 2023-11-20)) is executable
  • Use `:SourcegraphDownloadBinaries` to avoid building locally.
    
  • OK Found sg-nvim-agent: "/home/toto/.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: /home/toto/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js
  • OK Authentication setup correctly
  • OK endpoint set to: https://viavi.sourcegraphcloud.com
  • OK Found correct binary versions: "1.1.0" = "1.1.0"
  • OK Sourcegraph Connection info: {
    access_token_set = true,
    endpoint = "https://enterprise.sourcegraphcloud.com",
    sg_nvim_version = "1.1.0",
    sourcegraph_version = {
    build = "5.4.7765",
    product = "5.4.7765"
    }
    }
  • To manage your Cody Account, navigate to: https://sourcegraph.com/cody/manage
  • OK Cody Account Information: {
    cody_pro_enabled = false,
    username = "toto"
    }
  • OK sg.nvim is ready to run

Also i'm using sourcegraph entreprise trial.

Thanks for help

@julienTraversier
Copy link
Author

in sg.lua

vim.api.nvim_create_autocmd("BufReadCmd", {
  group = vim.api.nvim_create_augroup("sourcegraph-bufread", { clear = true }),
  pattern = { "sg://*", "https://sourcegraphcloud.com/*" },
  callback = function(event)
    bufread.edit(
      event.buf or vim.api.nvim_get_current_buf(),
      vim.fn.expand "<amatch>" --[[@as string]]
    )
  end,
  desc = "Sourcegraph link and protocol handler",
})

The pattern should match the endpoint because in my case it has a prefix with the name of my enterprise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant