This project is an early adopter of Microsoft's LSIF standard. LSIF (Language Server Index Format) is a format used to store the results of language server queries that are computed ahead-of-time. We uses this format to provide jump-to-definition, find-reference, and hover docstring functionality.
LSIF dumps are generated by running an LSIF indexer in a build or continuous integration environment. The dump is uploaded to a Sourcegraph instance via Sourcegraph CLI. An LSIF server, proxied by the frontend for auth, answers relevant LSP queries to provide fast and precise code intelligence.
This project is split into two parts, both written in TypeScript. These parts are deployable independently, but for now they run in the same docker container. The HTTP server receives LSIF uploads and answers LSP queries by looking at a relevant SQLite database on-disk. The worker receives job requests via Redis. The worker converts LSIF dump uploads into SQLite databases that can be queried by the server.
- Usage documentation is provided on Sourcegraph.com.
- API endpoint documentation is provided in api.md.
- Worker job documentation is provided in jobs.md.
- Database configuration and migrations are described in database.md.
- Data models are described in datamodel.md and datamodel.xrepo.md.