# Lay some groundwork for language plugins \(\#3837\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b594e591341a024f66639d66dd41fd6019456808)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b594e591341a024f66639d66dd41fd6019456808

Requested commit: b594e591341a024f66639d66dd41fd6019456808

Commit: b594e591341a024f66639d66dd41fd6019456808

Tree: f9637d8ee2248b1df69120733cb6ba2b658b3c20

Author: Max Brunsfeld

Committer: GitHub

## Message

```
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.
```

## Parents

- [5f8417249c17f0e899b1591d37247107a22657f9](https://git.cafe/gitcafe/zed/commit/5f8417249c17f0e899b1591d37247107a22657f9?format=markdown)

- [64e512232dd6dbe6c885c656441a7cf1ec57449b](https://git.cafe/gitcafe/zed/commit/64e512232dd6dbe6c885c656441a7cf1ec57449b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b594e591341a024f66639d66dd41fd6019456808?format=markdown)
