mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 03:25:59 +00:00
b594e59134
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. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |