Commit graph

431 commits

Author SHA1 Message Date
tidely
7bdc99abc1
Fix clippy::redundant_clone lint violations (#36558)
This removes around 900 unnecessary clones, ranging from cloning a few
ints all the way to large data structures and images.

A lot of these were fixed using `cargo clippy --fix --workspace
--all-targets`, however it often breaks other lints and needs to be run
again. This was then followed up with some manual fixing.

I understand this is a large diff, but all the changes are pretty
trivial. Rust is doing some heavy lifting here for us. Once I get it up
to speed with main, I'd appreciate this getting merged rather sooner
than later.

Release Notes:

- N/A
2025-08-20 12:20:13 +02:00
Piotr Osiewicz
05fc0c432c
Fix a bunch of other low-hanging style lints (#36498)
- **Fix a bunch of low hanging style lints like unnecessary-return**
- **Fix single worktree violation**
- **And the rest**

Release Notes:

- N/A
2025-08-19 21:26:17 +02:00
Piotr Osiewicz
8f567383e4
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-19 13:27:24 +00:00
Marshall Bowers
15a1eb2a2e
emmet: Extract to zed-extensions/emmet repository (#36323)
This PR extracts the Emmet extension to the
[zed-extensions/emmet](https://github.com/zed-extensions/emmet)
repository.

Release Notes:

- N/A
2025-08-16 17:02:51 +00:00
Marshall Bowers
4238e640fa
emmet: Bump to v0.0.6 (#36129)
This PR bumps the Emmet extension to v0.0.6.

Changes:

- https://github.com/zed-industries/zed/pull/36126

Release Notes:

- N/A
2025-08-13 16:55:02 +00:00
Marshall Bowers
2da80e4641
emmet: Use index.js directly to launch language server (#36126)
This PR updates the Emmet extension to use the `index.js` file directly
to launch the language server.

This provides better cross-platform support, as we're not relying on
platform-specific `.bin` wrappers.

Release Notes:

- N/A
2025-08-13 16:34:18 +00:00
Marshall Bowers
d030bb6281
emmet: Bump to v0.0.5 (#36066)
This PR bumps the Emmet extension to v0.0.5.

Changes:

- https://github.com/zed-industries/zed/pull/35599
- https://github.com/zed-industries/zed/pull/36064

Release Notes:

- N/A
2025-08-12 18:41:26 +00:00
Marshall Bowers
3a04657730
emmet: Add workaround for leading / on Windows paths (#36064)
This PR adds a workaround for the leading `/` on Windows paths
(https://github.com/zed-industries/zed/issues/20559).

Release Notes:

- N/A
2025-08-12 18:24:25 +00:00
Samuel
d6022dc87c
emmet: Enable in Vue.js files (#35599)
Resolves part of #34337

Actually I need also to add:

```
"languages": {
    "Vue.js": {
      "language_servers": [
        "vue-language-server",
        "emmet-language-server",
        "..."
      ]
    }
  },
```

not sure how to resolve fully, happy to continue only little guidance
needed.

Release Notes:

- allow emmet in Vue.js files

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-08-08 02:50:54 +00:00
Piotr Osiewicz
919b888387
ruff: Bump to 0.1.1 (#35635)
We want Ruff to be built with newer Rust version (as it was built
pre-1.84 where we've fixed a bug in std).

Closes #35627

Release Notes:

- N/A
2025-08-05 12:56:49 +00:00
Finn Evers
0be83f1c67
emmet: Bump to 0.0.4 (#35305)
This PR bumps the emmet extension to version 0.0.4. 

Includes:
- https://github.com/zed-industries/zed/pull/33865
- https://github.com/zed-industries/zed/pull/32208
- https://github.com/zed-industries/zed/pull/15177

Note that this intentionally does NOT include a change in the
`extension.toml`: The version was bumped incorrectly once in
https://github.com/zed-industries/zed/pull/32208 in both the
`extension.toml` as well as the `Cargo.lock` but not in the
`Cargo.toml`. After that,
https://github.com/zed-industries/zed/pull/33667 only removed the
changes in the `Cargo.lock` but didn't revert the change in the
`extension.toml` file. Hence, the version in the `extension.toml` is
already at `0.0.4`

Release Notes:

- N/A
2025-07-29 22:46:17 +00:00
claytonrcarter
1f4c9b9427
language: Update block_comment and documentation comment (#34861)
As suggested in https://github.com/zed-industries/zed/pull/34418, this
proposes various changes to language configs to make block comments and
doc-block-style comments more similar. In doing so, it introduces some
breaking changes into the extension schema.

This change is needed to support the changes I'm working on in #34418,
to be able to support `rewrap` in block comments like `/* really long
comment ... */`. As is, we can do this in C-style doc-block comments (eg
`/** ... */`) because of the config in `documentation`, but we can't do
this in regular block comments because we lack the info about what the
line prefix and indentation should be.

And while I was here, I did various other clean-ups, many of which feel
nice but are optional.

I would love special attention on the changes to the schema, version and
related changes; I'm totally unfamiliar with that part of Zed.

**Summary of changes**
- break: changes type of `block_comment` to same type as
`documentation_comment` (**this is the important change**)
- break: rename `documentation` to `documentation_comment` (optional,
but improves consistency w/ `line_comments` and `block_comment`)
- break/refactor?: removes some whitespace in the declaration of
`block_comment` delimiters (optional, may break things, need input; some
langs had no spaces, others did)
- refactor: change `tab_size` from `NonZeroU32` to just a `u32` (some
block comments don't seem to need/want indent past the initial
delimiter, so we need this be 0 sometimes)
- refactor: moves the `documentation_comment` declarations to appear
next to `block_comment`, rearranges the order of the fields in the TOML
for `documentation_comment`, rename backing `struct` (all optional)

**Future scope**
I believe that this will also allow us to extend regular block comments
on newline – as we do doc-block comments – but I haven't looked into
this yet. (eg, in JS try pressing enter in both of these: `/* */` and
`/** */`; the latter should extend w/ a `*` prefixed line, while the
former does not.)

Release Notes:

- BREAKING CHANGE: update extension schema version from 1 to 2, change
format of `block_comment` and rename `documentation_comment`

/cc @smitbarmase
2025-07-23 20:38:52 +05:30
Peter Tripp
684e14e55b
Move Perplexity extension to dedicated repository (#34070)
Move Perplexity extension to:
https://github.com/zed-extensions/perplexity

Release Notes:

- N/A
2025-07-08 13:40:00 -04:00
Vitaly Slobodin
4ad47fc9cc
emmet: Enable in HTML/ERB files (#33865)
Closes [#133](https://github.com/zed-extensions/ruby/issues/133)

This PR enables the Emmet LS in `HTML/ERB` files that we added in the
https://github.com/zed-extensions/ruby/pull/113. Let me know if I picked
the right approach here.

Thanks!

Release Notes:

- N/A
2025-07-05 02:51:25 +03:00
Conrad Taylor
7c4da37322
emmet: Fix expansion for HEEx and H sigil files (#32208)
Closes #14149

Release Notes:

- Added support for the Emmet LSP in Elixir heex files
2025-06-30 12:45:10 -04:00
not a cow
b7c2d4876c
Fix syntax highlighting conflicts with certain glsl types (#32022)
added first line pattern for glsl because some extensions conflict with
others like fragment shaders (.fs) would be highlighted by f#

<details>

| no f# extension no fix | f# extension no fix | f# extension with fix |
|--------|--------|--------|
|
![zed_TW1mkwXSMS](https://github.com/user-attachments/assets/d3d64b44-ced5-41a8-86b1-36cafc92f7e4)
|
![zed_T5ewceKmHo](https://github.com/user-attachments/assets/08ced11d-c2c6-4b73-964d-768e8ba763da)
|
![zed_9Rhkc5flQZ](https://github.com/user-attachments/assets/9e949d00-4e69-4687-9863-e0ab38b8b3df)
|

</details>

Release Notes:

- glsl: Added a workaround for an issue where fragment shaders with the `.fs` file extension would be misidentified as F#. Now, adding `#version {version}` to the first line of your fragment shader will ensure it is always recognized as glsl
2025-06-06 20:58:18 +00:00
Kirill Bulatov
d8fc23a5e9
toml: Bump to v0.1.4 (#31272)
Closes https://github.com/zed-industries/zed/issues/31261

Changes:

* https://github.com/zed-industries/zed/pull/31267


Release Notes:

- N/A
2025-05-23 12:18:24 +00:00
Kirill Bulatov
9b7d849879
Fix taplo artifact naming (#31267)
Part of https://github.com/zed-industries/zed/issues/31261

https://github.com/tamasfe/taplo/pull/598#issuecomment-2292984164
renamed all artifacts almost a year ago, and now had released it
finally.
Have to abide to that YOLO move.

Release Notes:

- N/A
2025-05-23 11:59:20 +00:00
Cole Miller
d25da9728b
Run additional checks from script/clippy if local (#29768)
Should cut down on the number of CI cycles if you're forgetful like I
am!

Release Notes:

- N/A
2025-05-02 01:26:12 +00:00
chbk
e4f692ac75
html: Improve syntax highlighting (#28184)
| Zed 0.180.2 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/89d70ba1-791b-462e-9a14-31c75bcebb7e)
|
![Image](https://github.com/user-attachments/assets/9199499e-071e-49b3-8536-b04b8ce5a222)
|


```html
<script>
  return <div class="main content"></div>
</script>
<div class="main content"></div>
<span></spn>
```

Changes homogenize JSX and HTML

- `"`: `string`
- `=`: `operator` -> `punctuation.delimiter` like in
[JSX](3775496b84/crates/languages/src/javascript/highlights.scm (L246)),
[VSCode](336801752d/extensions/html/syntaxes/html.tmLanguage.json (L382))
- `erroneous_end_tag_name`: `keyword` -> not a keyword

Release Notes:

  - Improved HTML highlighting
2025-04-17 13:40:56 -04:00
Marshall Bowers
1164829cad
html: Bump to v0.2.1 (#28575)
This PR bumps the HTML extension to v0.2.1.

Changes:

- https://github.com/zed-industries/zed/pull/28542

Release Notes:

- N/A
2025-04-11 13:58:30 +00:00
vipex
8ee6a2b454
html: Fix leading slash on Windows paths (#28542)
This PR builds on the fix proposed in
[zed-extensions/astro#5](https://github.com/zed-extensions/astro/pull/5)
and serves as a workaround for certain LSPs affected by
[zed-industries/zed#20559](https://github.com/zed-industries/zed/issues/20559)—specifically,
the HTML language server in this case.

Credit to @maxdeviant for identifying and implementing the original fix.
This PR extends that solution to other areas where it may be beneficial.

Release Notes:

- N/A
2025-04-10 18:34:22 -04:00
Piotr Osiewicz
dc64ec9cc8
chore: Bump Rust edition to 2024 (#27800)
Follow-up to https://github.com/zed-industries/zed/pull/27791

Release Notes:

- N/A
2025-03-31 20:55:27 +02:00
Ben Kunkle
12c58d01bb
proto: Bump version to v0.2.2 (#27732)
Release Notes:

- N/A
2025-03-31 10:21:37 -04:00
Ben Kunkle
548a8d75e6
proto: Create indents.scm (#27730)
Closes #27676

Release Notes:

- N/A
2025-03-29 15:24:05 +00:00
Peter Tripp
e6c473a488
html: Update HTML Extension to v0.2.0 (#27548)
Includes:
- https://github.com/zed-industries/zed/pull/27524

Release Notes:

- N/A
2025-03-27 09:00:30 -04:00
Peter Tripp
435a36b9f9
html: Improve settings, formatting and user binaries (#27524)
Added support for using `language_server` as HTML formatter.
Added support for finding `vscode-html-language-server` in user's path.

Release Notes:

- N/A
2025-03-26 16:24:37 -04:00
Smit Barmase
23e8519057
Add completion_query_characters in language (#27175)
Closes #18581

Now characters for completing query and word characters, which are
responsible for selecting words by double clicking or navigating, are
different. This fixes a bunch of things:

For settings.json, this improves completions to treat the whole string
as a completion query, instead of just the last word. We now added
"space" as a completion query character without it being a word
character.

For keymap.json, this improves selecting part of an action as the ":"
character is only a completion character and not a word character. So,
completions would still trigger on ":" and query capture will treat ":"
as a word, but for actions like selections and navigation, ":" will be
treated as punctuation.

Before:
Unnecessary related suggestions as query is only the last word which is
"d".
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/8199a715-7521-49dd-948b-e6aaed04c488"
/>

Double clicking `ToggleFold` selects the whole action:
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/c7f91a6b-06d5-45b6-9d59-61a1b2deda71"
/>

After:
Now query is "one d" and it shows only matched ones.
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/1455dfbc-9906-42e8-b8aa-b3f551194ca2"
/>

Double clicking `ToggleFold` only selects part of the action, which is
more refined behavior.
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/34b1c3c2-184f-402f-9dc8-73030a8c370f"
/>

Release Notes:

- Improved autocomplete suggestions in `settings.json`, now whole string
is queried instead of just last word of string, which filters out lot of
false positives.
- Improved selection of action in `keymap.json`, where now you can
double click to only select certain part of action, instead of selecting
whole action.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-03-20 16:45:35 +05:30
Marshall Bowers
3ec323ce0d
uiua: Extract to zed-extensions/uiua repository (#26587)
This PR extracts the Uiua extension to the
[zed-extensions/uiua](https://github.com/zed-extensions/uiua)
repository.

Release Notes:

- N/A
2025-03-12 19:55:37 +00:00
Marshall Bowers
5858e61327
purescript: Extract to zed-extensions/purescript repository (#26571)
This PR extracts the PureScript extension to the
[zed-extensions/purescript](https://github.com/zed-extensions/purescript)
repository.

Release Notes:

- N/A
2025-03-12 18:42:12 +00:00
Marshall Bowers
a3ca5554fd
zig: Extract to zed-extensions/zig repository (#26569)
This PR extracts the Zig extension to the
[zed-extensions/zig](https://github.com/zed-extensions/zig) repository.

Release Notes:

- N/A
2025-03-12 18:28:26 +00:00
Marshall Bowers
efdb769f9b
terraform: Extract to zed-extensions/terraform repository (#26475)
This PR extracts the Terraform extension to the
[zed-extensions/terraform](https://github.com/zed-extensions/terraform)
repository.

Release Notes:

- N/A
2025-03-11 19:10:51 +00:00
Piotr Osiewicz
2021ca5bff
terraform: Do not add each string constraint to the outline (#26453)
Closes #26336

Release Notes:

- N/A
2025-03-11 19:46:18 +01:00
Marshall Bowers
4f6682c7fe
haskell: Extract to zed-extensions/haskell repository (#26306)
This PR extracts the Haskell extension to the
[zed-extensions/haskell](https://github.com/zed-extensions/haskell)
repository.

Release Notes:

- N/A
2025-03-07 22:07:04 +00:00
Marshall Bowers
349a48d937
lua: Extract to zed-extensions/lua repository (#26250)
This PR extracts the Lua extension to the
[zed-extensions/lua](https://github.com/zed-extensions/lua) repository.

Release Notes:

- N/A
2025-03-06 23:17:34 +00:00
Finn Evers
efaf358876
lua: Update keyword operator highlighting (#26091)
Resolves #26032 

This PR changes the highlighting for `and`, `not` and `or` in Lua from
`operator` to `keyword.operator`. [VS Code also highlights these as
keyword
operators](1483add845/Syntaxes/Lua.plist (L277-L279))
and Zed does this for other languages as well, like
[Python](813e207514/crates/languages/src/python/highlights.scm (L221-L229))
or
[Zig](813e207514/extensions/zig/languages/zig/highlights.scm (L145-L149)).

Additionally, in 813e207514 I removed
duplicate matches for existing keywords to improve readability and align
them to how keywords are generally matched across languages (see
[Rust](813e207514/crates/languages/src/rust/highlights.scm (L79-L119))
and
[Typescript](813e207514/crates/languages/src/typescript/highlights.scm (L210-L269))
for example).
Whilst contributing to the majority of the diff, this does not change
any existing highlights.

| Before | After | 
| --- | --- |
| <img width="309" alt="old"
src="https://github.com/user-attachments/assets/7790817e-4a0d-442b-b176-9a84bcc6f3c4"
/> | <img width="309" alt="PR"
src="https://github.com/user-attachments/assets/34a57962-938a-4465-9406-288f5c456aa3"
/> |


Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-03-06 18:01:13 -05:00
Marshall Bowers
330e799293
erlang: Extract to zed-extensions/erlang repository (#26248)
This PR extracts the Erlang extension to the
[zed-extensions/erlang](https://github.com/zed-extensions/erlang)
repository.

Release Notes:

- N/A
2025-03-06 22:53:13 +00:00
Marshall Bowers
6fd9708eee
extension: Add capabilities for the process API (#26224)
This PR adds support for capabilities for the extension process API.

In order to use the process API, an extension must declare which
commands it wants to use, with arguments:

```toml
[[capabilities]]
kind = "process:exec"
command = "echo"
args = ["hello!"]
```

A `*` can be used to denote a single wildcard in the argument list:

```toml
[[capabilities]]
kind = "process:exec"
command = "echo"
args = ["*"]
```

And `**` can be used to denote a wildcard for the remaining arguments:

```toml
[[capabilities]]
kind = "process:exec"
command = "ls"
args = ["-a", "**"]
```

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-03-06 11:55:00 -05:00
Chris Boette
aef25a3bc3
slash_commands_example: Improve setup instructions in README (#26217)
This PR improves the setup instructions for the slash-commands-example
extension by:

1. Replacing the `sed` command with a more reliable approach that
completely replaces the Cargo.toml file.

2. Explicitly showing how to create a standalone extension with a
properly configured Cargo.toml file that:
   - Uses `edition = "2021"` instead of `edition.workspace = true`
   - Doesn't include `publish.workspace = true`
   - Doesn't include the `[lints]` section

This change addresses an issue where the extension wouldn't work when
copied as a standalone project due to workspace references that are only
valid when the extension is built as part of the main Zed repository.

The updated instructions provide a clear, reliable path for developers
to create their own Zed extensions based on the slash commands example.

Release Notes:

- N/A
2025-03-06 10:56:17 -05:00
Marshall Bowers
4db9ab15a7
elixir: Extract to zed-extensions/elixir repository (#26167)
This PR extracts the Elixir extension to the
[zed-extensions/elixir](https://github.com/zed-extensions/elixir)
repository.

Release Notes:

- N/A
2025-03-05 22:50:35 +00:00
Marshall Bowers
431727fdd7
csharp: Extract to zed-extensions/csharp repository (#26166)
This PR extracts the C# extension to the
[zed-extensions/csharp](https://github.com/zed-extensions/csharp)
repository.

Release Notes:

- N/A
2025-03-05 22:23:49 +00:00
Marshall Bowers
82d85fd2ed
deno: Extract to zed-extensions/deno repository (#26129)
This PR extracts the Deno extension to the
[zed-extensions/deno](https://github.com/zed-extensions/deno)
repository.

Release Notes:

- N/A
2025-03-05 15:31:21 +00:00
Finn Evers
27781a8a60
html: Add injections for style attributes and event handler attributes (#23659)
Closes #23653 

Before:
<img width="921" alt="before"
src="https://github.com/user-attachments/assets/e993df15-77a7-4b5a-b6fb-3415047914c0"
/>

After:
<img width="922" alt="after"
src="https://github.com/user-attachments/assets/1b4bd695-2985-46e2-8b55-576d32af0583"
/>

Release Notes:

- N/A
2025-03-04 09:12:25 +02:00
Nathan Igo
212c8f4c31
html: Bump to v0.1.6 (#25791)
Includes:
- #25130

Release Notes:

- N/A
2025-02-27 20:38:55 -05:00
Marshall Bowers
0eea8c3e60
toml: Bump to v0.1.3 (#25278)
This PR bumps the TOML extension to v0.1.3.

Changes:

- https://github.com/zed-industries/zed/pull/25276

Release Notes:

- N/A
2025-02-20 20:02:56 +00:00
Marshall Bowers
2581f8be92
toml: Respect language server binary settings (#25276)
This PR updates the TOML extension to respect the `binary` settings for
the language server.

Related to https://github.com/zed-industries/zed/issues/22775.

Release Notes:

- N/A
2025-02-20 19:42:55 +00:00
Marshall Bowers
d4392aaf2d
deno: Bump to v0.1.0 (#25255)
This PR bumps the Deno extension to v0.1.0.

Changes:

- https://github.com/zed-industries/zed/pull/16955
- https://github.com/zed-industries/zed/pull/25252

Release Notes:

- N/A
2025-02-20 13:47:08 +00:00
Finn Evers
7f3e2e4aba
deno: Make downloaded language server binary executable (#25252)
Closes #20347

This PR fixes the downloaded Deno LSP binary not being able to start by
marking it as executable.

Release Notes:

- N/A
2025-02-20 08:28:05 -05:00
Cole Miller
1429363218
html: Open extra newline between opening and closing HTML tags (#25130)
Closes #12064

It feels a bit strange to use `brackets` for this but it seems to work
without unintended consequences from my testing so far.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-20 01:09:19 -05:00
Peter Tripp
cf9661a56b
Improve extension extraction documentation (#24590)
- Add .gitignore
- Update extension.toml URL
- Script cleanup of Cargo.toml workspace lines
2025-02-10 22:11:23 -05:00