Previously, there was no way to interactively search for a file that matches a given fuzzy query. This commit adds a new modal that activates on the keyboard shortcut `t` and allows the user to quickly open a file that fuzzily matches a given query. The implementation in this commit is specifically designed to handle large repositories with >100k source files. The fuzzy finder achieves low-latency by: 1) implementating all the filtering inside the browser on the client-side 2) using bloom filters to quickly discard buckets of filenames that are guaranteed to not match a given query. This technique is used by the Scala language server and documented in this blog post https://scalameta.org/metals/blog/2019/01/22/bloom-filters.html The downside of this approach: 1) it can take a while to first download all filenames in the repository, especially for large repos like chromium/chromium. It should be possible to optimize some parts of this on the backend. 2) the bloom filter algorithm is sometimes more strict compared to the fuzzy finder in VS Code and IntelliJ. There are techniques to make the fuzzy finder more fuzzy, for example we could make all-lowercase queries case-insensitive. It's also worth consider whether we want use a different filtering algorithm for smaller repositories (<25k source files) |
||
|---|---|---|
| .buildkite | ||
| .github | ||
| .vscode | ||
| client | ||
| cmd | ||
| dev | ||
| doc | ||
| docker-images | ||
| enterprise | ||
| internal | ||
| lib | ||
| migrations | ||
| monitoring | ||
| schema | ||
| third-party-licenses | ||
| ui/assets | ||
| .dockerignore | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .golangci.yml | ||
| .graphqlrc.yml | ||
| .mailmap | ||
| .mocharc.js | ||
| .nvmrc | ||
| .percy.yml | ||
| .prettierignore | ||
| .stylelintignore | ||
| .stylelintrc.json | ||
| .tool-versions | ||
| .yarnrc | ||
| babel.config.js | ||
| CHANGELOG.md | ||
| CODENOTIFY | ||
| CONTRIBUTING.md | ||
| doc.go | ||
| go.mod | ||
| go.sum | ||
| graphql-schema-linter.config.js | ||
| gulpfile.js | ||
| jest.config.base.js | ||
| jest.config.js | ||
| LICENSE | ||
| LICENSE.apache | ||
| LICENSE.enterprise | ||
| package.json | ||
| postcss.config.js | ||
| prettier.config.js | ||
| README.md | ||
| renovate.json | ||
| SECURITY.md | ||
| sg.config.yaml | ||
| tsconfig.all.json | ||
| tsconfig.json | ||
| yarn.lock | ||
Sourcegraph OSS edition is a fast, open-source, fully-featured code search and navigation engine. Enterprise editions are available.
Features
- Fast global code search with a hybrid backend that combines a trigram index with in-memory streaming.
- Code intelligence for many languages via the Language Server Index Format.
- Enhances GitHub, GitLab, Phabricator, and other code hosts and code review tools via the Sourcegraph browser extension.
- Integration with third-party developer tools via the Sourcegraph extension API.
Try it yourself
- Try out the public instance on any open-source repository at sourcegraph.com.
- Install the free and open-source browser extension.
- Spin up your own instance with the quickstart installation guide.
- File feature requests and bug reports in our issue tracker.
- Visit about.sourcegraph.com for more information about product features.
Development
Prerequisites
- Git
- Go (1.15 or later)
- Docker
- PostgreSQL (v11 or higher)
- Node.js (version 8 or 10)
- Redis
- Yarn
For a detailed guide to installing prerequisites, see these instructions.
Installation
Prebuilt Docker images are the fastest way to use Sourcegraph Enterprise. See the quickstart installation guide.
To use Sourcegraph OSS:
-
./dev/start.sh
Sourcegraph should now be running at https://sourcegraph.test:3443.
For detailed instructions and troubleshooting, see the local development documentation.
Documentation
The doc directory has additional documentation for developing and understanding Sourcegraph:
- Project FAQ
- Architecture: high-level architecture
- Database setup: database best practices
- General style guide
- Go style guide
- Documentation style guide
- GraphQL API: useful tips when modifying the GraphQL API
- Contributing
License
Sourcegraph OSS is available freely under the Apache 2 license. Sourcegraph OSS comprises all files in this repository except those in the enterprise/ and client/web/src/enterprise directories.
All files in the enterprise/ and client/web/src/enterprise/ directories are subject to the Sourcegraph Enterprise license.
