Skip to content

Latest commit

 

History

History
 
 

precise-code-intel

Precise code intelligence system

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 code intelligence

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 API server, proxied by the frontend for auth, answers relevant LSP queries to provide fast and precise code intelligence.

Architecture

This project is split into three parts, all currently written in TypeScript. These parts are deployable independently but can also run in the same docker container to simplify deployment with docker-compose.

  • The API server receives LSIF uploads and answers LSP queries via HTTP.
  • The bundle-manager answers queries about a particular upload by looking at relevant SQLite databases on-disk.
  • The worker dequeues unconverted LSIF uploads from Postgres and converts them into SQLite databases that can be queried by the server.

The api-server, bundle-manager, and worker directories contain only instructions to build Docker images for the three entrypoints.

Documentation