This PR adds a REST API to the collab server for searching and
downloading extensions. Previously, we had implemented this API in
zed.dev directly, but this implementation is better, because we use the
collab database to store the download counts for extensions.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
This PR adds a view for installing extensions within Zed.
My subtasks:
- [X] Page Extensions and assign in App Menu
- [X] List extensions
- [X] Button to Install/Uninstall
- [x] Search Input to search in extensions registry API
- [x] Get Extensions from API
- [x] Action install to download extension and copy in /extensions
folder
- [x] Action uninstall to remove from /extensions folder
- [x] Filtering
- [x] Better UI Design
Open to collab!
Release Notes:
- Added an extension installation view. Open it using the `zed:
extensions` action in the command palette
([#7096](https://github.com/zed-industries/zed/issues/7096)).
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Carlos <foxkdev@gmail.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Max <max@zed.dev>
Current limitations:
* Not able to navigate into JAR files
Release Notes:
- Added Clojure language support
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This PR adds the initial support for loading extensions in Zed.
### Extensions Directory
Extensions are loaded from the extensions directory.
The extensions directory has the following structure:
```
extensions/
installed/
extension-a/
grammars/
languages/
extension-b/
themes/
manifest.json
```
The `manifest.json` file is used internally by Zed to keep track of
which extensions are installed. This file should be maintained
automatically, and shouldn't require any direct interaction with it.
Extensions can provide Tree-sitter grammars, languages, and themes.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Terraform and HCL are almost the same language, but not quite so
proposing them as separate languages within Zed. (Terraform is an
extension of HCL, with a different formatter.)
This is just adding the language definition, parsing and highlighting
functionality, not any LSP or formatting beyond that for either
language.
I've taken a bunch of inspiration from Neovim for having the separate
languages, and also lifted some of their `scm` files (with attribution
comments in this codebase) as the tree-sitter repo doesn't contain them.
(Neovim's code is Apache-2.0 licensed, so should be fine here with
attribution from reading Zed's licenses files.) I've then amended to
make sure the capture groups are named for things Zed understands. I'd
love someone from Zed to confirm that's okay, or if I should clean-room
implement the `scm` files.
Highlighting in Terraform & HCL with a moderate amount of syntax in a
file (Terraform on left, HCL on right.)
<img width="1392" alt="Screenshot 2024-01-31 at 18 07 45"
src="https://github.com/zed-industries/zed/assets/696/1d3c9a08-588e-4b8f-ad92-98ce1e419659">
Release Notes:
- (|Improved) ...
([#5098](https://github.com/zed-industries/zed/issues/5098)).
Adds a "markdown: open preview" action to open a markdown preview.
https://github.com/zed-industries/zed/assets/18583882/6fd7f009-53f7-4f98-84ea-7dd3f0dd11bf
This PR extends the work done in `crates/rich_text` to render markdown
to also support:
- Variable heading sizes
- Markdown tables
- Code blocks
- Block quotes
## Release Notes
- Added `Markdown: Open preview` action to partially close
([#6789](https://github.com/zed-industries/zed/issues/6789)).
## Known issues that will not be included in this PR
- Images.
- Nested block quotes.
- Footnote Reference.
- Headers highlighting.
- Inline code highlighting (this will need to be implemented in
`rich_text`)
- Checkboxes (`- [ ]` and `- [x]`)
- Syntax highlighting in code blocks.
- Markdown table text alignment.
- Inner markdown URL clicks
Part of https://github.com/zed-industries/zed/issues/7096
* [x] Load all queries for language plugins, not just highlight query
* [x] Auto-reload languages when changing the `plugins` directory
* [x] Bump Tree-sitter for language loading and unloading fixes
* [x] Figure out code signing
Release Notes:
- N/A
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.
This should make them easier to visually scan when looking for a
dependency.
Apologies in advance for any merge conflicts 🙈
Release Notes:
- N/A
This PR adds the ability to copy the permalink to a line from within
Zed.
This functionality is available through the `editor: copy permalink to
line` action in the command palette:
<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">
Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.
Here is an example line:
```
56c80e8011/src/lib.rs (L25)
```
Currently, both GitHub and GitLab are supported.
### Notes and known limitations
- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.
Release Notes:
- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR upgrades `tree-sitter-php` to v0.21.1.
Here is the diff between our current version and this version:
d43130fd15...29a49d3a53
The primary impetus for this change is to get this change that adds the
`license` field to the `Cargo.toml`:
https://github.com/tree-sitter/tree-sitter-php/pull/193
This will silence the warning that is shown when running
`script/generate-licenses`.
Release Notes:
- Upgraded `tree-sitter-php` to v0.21.1.
This PR bumps our version of `tree-sitter-haskell` for the addition of
the `license` field in
https://github.com/tree-sitter/tree-sitter-haskell/pull/112.
This will silence the warning that is shown when running
`script/generate-licenses`.
Release Notes:
- N/A
This reduces size of release binary by ~20% from 134MB to 107MB without noticeable slowdown on startup. Assets are decompressed granularly, on first access
This essentially shaves off about 10% off of an incremental build after
project change and potentially more if you're changing stuff like
`welcome` that's very close to the `zed` crate in the dep graph. That's
because macro expansion takes place even in incremental builds it seems?
And zed (lib) + zed (bin) could take up to 4 seconds out of an
incremental build, which is a *lot* in a 10s build. In reality though it
shaves 1 second off of 5 seconds incremental 'welcome'/ 1s off of 10s
'project' builds.
Note that we had `assets` crate in the past (removed in #2575 /cc
@maxbrunsfeld), but this is a bit different, because `assets` is a
dependency of *just* zed and nothing else. We essentially cache macro
expansion results ourselves.
Release Notes:
- N/A
This PR upgrades our version of `ctor` to v0.2.6.
We were previously using a fork that contained this fix:
https://github.com/mmastrac/rust-ctor/pull/295.
A new version of `ctor` has now been released with that change, so we
can switch back to the mainline version.
I scanned through the diff between versions (since we're upgrading from
effectively v0.1.20) and didn't notice anything that seemed obviously
breaking:
564b87f1dc...ee6b4b1c7b
Release Notes:
- N/A