`src lsp` - Sourcegraph docs


'src lsp' runs a Language Server Protocol server that proxies LSP
requests to Sourcegraph's code intelligence backend.

The server communicates over stdio (stdin/stdout) and is designed
to be used with editors like Neovim.

Prerequisites:
  - The working directory must be inside a Git repository
  - The repository must be indexed on your Sourcegraph instance
  - SRC_ENDPOINT and SRC_ACCESS_TOKEN environment variables must be set

Supported LSP methods:
  - textDocument/definition
  - textDocument/references
  - textDocument/hover
  - textDocument/documentHighlight

Example Neovim configuration (0.11+):

  vim.lsp.config['src-lsp'] = {
    cmd = { 'src', 'lsp' },
    root_markers = { '.git' },
    filetypes = { 'go', 'typescript', 'python' },
  }
  vim.lsp.enable('src-lsp')

Usage of 'src lsp':
  -dump-requests
    	Log GraphQL requests and responses to stdout
  -get-curl
    	Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
  -insecure-skip-verify
    	Skip validation of TLS certificates against trusted chains
  -trace
    	Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
  -user-agent-telemetry
    	Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)