zed/crates/extension
Marshall Bowers 764e256755
Add support for building a Tree-sitter grammar at a given path (#9965)
This PR extends the extension builder—and by extension, the
`zed-extension` CLI—with support for building a Tree-sitter grammar at a
given path within the grammar repository.

Some Tree-sitter grammar repos contain multiple grammars inside of them.
For instance,
[`tree-sitter-php`](29838ad107)
has subfolders for `php` and `php_only`.

The grammar entries in `extension.toml` can now have an optional `path`
field that will be interpreted relative to the root of the grammar
repository:

```toml
[grammars.php]
repository = "https://github.com/tree-sitter/tree-sitter-php"
commit = "8ab93274065cbaf529ea15c24360cfa3348ec9e4"
path = "php"
```

This was something we supported in the old extension packaging script,
but hadn't yet carried it over when we built the new extension builder.

Release Notes:

- N/A
2024-03-29 14:30:10 -04:00
..
src Add support for building a Tree-sitter grammar at a given path (#9965) 2024-03-29 14:30:10 -04:00
Cargo.toml Extract SemanticVersion into its own crate (#9956) 2024-03-29 12:11:57 -04:00
LICENSE-GPL Add logic for managing language and theme extensions (#7467) 2024-02-07 15:14:50 -05:00