zed/crates/semantic_index2
Max Brunsfeld b594e59134
Lay some groundwork for language plugins (#3837)
This PR adds undocumented functionality for loading custom language
plugins at runtime. I don't intend to expose the functionality to end
users yet, but this will allow the team to test the capability
internally.

### Implementation

There isn't much new code in Zed. Most of the work here is within
Tree-sitter, in PRs https://github.com/tree-sitter/tree-sitter/pull/1864
and https://github.com/tree-sitter/tree-sitter/pull/2840, which allow
Tree-sitter to load languages from WASM blobs. I've tested the
functionality in Tree-sitter's test suite and via its CLI, but having it
wired into Zed allows us to test the functionality more fully.

### Details

Now, on startup, Zed will look for subdirectories inside of
`~/Application Support/plugins`. These subdirectories are expected to
look similar to the per-language subdirectories in
[`crates/zed2/src/languages`](https://github.com/zed-industries/zed/tree/main/crates/zed2/src/languages),
except that they also contain a `.wasm` file for the parser itself.

I'll add more details here as I go.
2024-01-03 09:37:42 -08:00
..
eval Port semantic_index to gpui2 2023-12-05 15:38:36 +01:00
src Lay some groundwork for language plugins (#3837) 2024-01-03 09:37:42 -08:00
Cargo.toml Port semantic_index to gpui2 2023-12-05 15:38:36 +01:00
README.md Port semantic_index to gpui2 2023-12-05 15:38:36 +01:00

Semantic Index

Evaluation

Metrics

nDCG@k:

  • "The value of NDCG is determined by comparing the relevance of the items returned by the search engine to the relevance of the item that a hypothetical "ideal" search engine would return.
  • "The relevance of result is represented by a score (also known as a 'grade') that is assigned to the search query. The scores of these results are then discounted based on their position in the search results -- did they get recommended first or last?"

MRR@k:

  • "Mean reciprocal rank quantifies the rank of the first relevant item found in teh recommendation list."

MAP@k:

  • "Mean average precision averages the precision@k metric at each relevant item position in the recommendation list.

Resources: