Commit graph

404 commits

Author SHA1 Message Date
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
Peter Tripp
89e051d650
Update extension extraction documentation (2025-02-10) (#24585)
Include lessons learned from PHP Extension extraction.
2025-02-10 21:13:26 +00:00
Peter Tripp
62bb3398ed
Migate PHP Extension to zed-extensions/php (#24583)
PHP Extension has been extracted to it's own repository available here:
- https://github.com/zed-extensions/php
2025-02-10 16:07:38 -05:00
Finn Evers
d42322ab06
php: Update brackets.scm (#24558)
Closes #24550 
Adds some missing brackets to the PHP language extension.
2025-02-10 09:42:16 -05:00
Michael Sloan
146b9c232c
Sort and dedupe .gitignore files (#24491)
Release Notes:

- N/A
2025-02-08 02:17:17 +00:00
Peter Tripp
5315d38cf4
Update extension extraction docs (#24079)
- Fixed a regex for finding tags.
- Templatize the instructions with `$LANGNAME` to prevent manual errors
from failing to edit commands (this bit me)
- Ran formatting through Prettier
2025-02-06 19:01:32 -05:00
Peter Tripp
f6824e3eaa
Move scheme extension to zed-extensions/scheme (#24078)
New home: https://github.com/zed-extensions/scheme

- See also: https://github.com/zed-industries/extensions/pull/1981
2025-02-01 11:50:20 -05:00
Marshall Bowers
d1b8fedc9c
prisma: Extract to zed-extensions/prisma repository (#23961)
This PR extracts the Prisma extension to the
[zed-extensions/prisma](https://github.com/zed-extensions/prisma)
repository.

Release Notes:

- N/A
2025-01-30 18:39:34 +00:00
Victor Quiroz
353ae316c9
prisma: Update grammar and syntax highlighting (#23596)
- Updates the bindings
([tree-sitter-prisma](https://github.com/victorhqc/tree-sitter-prisma))
to its latest update (recently updated to use latest tree-sitter)
- Improves syntax highlighting
- Adds the `view` keyword

**After**

<img width="1174" alt="Screenshot 2025-01-24 at 12 44 57"
src="https://github.com/user-attachments/assets/84e6afe0-5340-4cdf-ad85-9a800a757323"
/>

**Before**

<img width="1174" alt="Screenshot 2025-01-24 at 12 44 45"
src="https://github.com/user-attachments/assets/11296998-fdfe-4fe8-8e5b-feeb41c24385"
/>

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-01-28 22:02:16 +00:00
Peter Tripp
1ac7da8473
terraform: Bump to v0.1.2 (#23546)
Includes:
- https://github.com/zed-industries/zed/pull/22268
2025-01-23 11:34:40 -05:00
Peter Tripp
469bfa752a
scheme: Bump to v0.0.2 (#23545)
Includes:
- https://github.com/zed-industries/zed/pull/18728
- https://github.com/zed-industries/zed/pull/20206
2025-01-23 11:34:29 -05:00
Peter Tripp
bb937b6cee
zig: Bump to v0.3.3 (#23547)
Includes:
- https://github.com/zed-industries/zed/pull/22609
2025-01-23 10:54:50 -05:00
Peter Tripp
ea1a6a68d3
php: Bump to v0.2.4 (#23543)
Includes:
- https://github.com/zed-industries/zed/pull/23532
- https://github.com/zed-industries/zed/pull/22268
2025-01-23 10:48:58 -05:00
Peter Tripp
63c5141365
purescript: Bump to v0.1.0 (#23544)
Includes:
- https://github.com/zed-industries/zed/pull/15181
- https://github.com/zed-industries/zed/pull/16955
- https://github.com/zed-industries/zed/pull/22609
2025-01-23 10:44:22 -05:00
Peter Tripp
26453a0f8f
csharp: Bump to v0.1.1 (#23539)
Includes:
- https://github.com/zed-industries/zed/pull/22936
2025-01-23 10:40:54 -05:00
Peter Tripp
a328c81ff6
html: Bump to v0.1.5 (#23542)
Includes:
- https://github.com/zed-industries/zed/pull/20752
- https://github.com/zed-industries/zed/pull/22268
2025-01-23 10:37:14 -05:00
Peter Tripp
9d6d98e94e
haskell: Bump to v0.1.3 (#23541)
Includes:
- https://github.com/zed-industries/zed/pull/22609
2025-01-23 10:30:47 -05:00
Peter Tripp
7d7db4debc
elixir: Bump to v0.1.4 (#23540)
Includes:
- https://github.com/zed-industries/zed/pull/22055
- https://github.com/zed-industries/zed/pull/22268
2025-01-23 10:27:21 -05:00
Ollie Beckwith
79683ebcaa
php: Add nowdoc language injection (#23532)
We already have heredoc injection support, so this just extends it to also cover
[nowdoc](https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc).
2025-01-23 09:51:18 -05:00
Piotr Osiewicz
c9534e8025
chore: Use workspace fields for edition and publish (#23291)
This prepares us for an upcoming bump to Rust 2024 edition.

Release Notes:

- N/A
2025-01-17 17:39:22 +01:00
Finn Evers
c6df23fcb6
csharp: Add brackets.scm (#22936)
This pull request adds the missing `brackets.scm` for the C#-extension.

Release Notes:

- N/A
2025-01-10 16:18:33 +00:00
uncenter
d58f006498
Use standard injection.language and injection.content captures (#22268)
Closes #9656. Continuation of #9654, but with the addition of backwards
compatibility for the existing captures.

Release Notes:

- Improved Tree-sitter support with added compatibility for standard
injections captures

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2025-01-07 18:17:49 +00:00
uncenter
7fa30f411d
html: Use @attribute highlight capture for HTML attributes (#20752)
`@attribute` is the very first query on the
https://zed.dev/docs/extensions/languages#syntax-highlighting captures
list, we should be using it! This PR changes the highlights queries for
HTML to use the `@attribute` capture instead of the `@property` capture
for `attribute_name` nodes.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2025-01-06 23:17:42 +00:00
David Baldwin
e36ae0465c
elixir: Add textobjects queries (#22055)
Release Notes:

- N/A

Adds textobjects queries for Elixir.

These queries were originally pulled directly from the
[nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects)
repo with [this
textobjects.scm](https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter-textobjects/refs/heads/master/queries/elixir/textobjects.scm)
file, but have been heavily edited for Zed.
2025-01-06 23:01:19 +00:00
Mikayla Maki
9613084f59
Move git status out of Entry (#22224)
- [x] Rewrite worktree git handling
- [x] Fix tests
- [x] Fix `test_propagate_statuses_for_repos_under_project`
- [x] Replace `WorkDirectoryEntry` with `WorkDirectory` in
`RepositoryEntry`
- [x] Add a worktree event for capturing git status changes
- [x] Confirm that the local repositories are correctly updating the new
WorkDirectory field
- [x] Implement the git statuses query as a join when pulling entries
out of worktree
- [x] Use this new join to implement the project panel and outline
panel.
- [x] Synchronize git statuses over the wire for collab and remote dev
(use the existing `worktree_repository_statuses` table, adjust as
needed)
- [x] Only send changed statuses to collab

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.com>
Co-authored-by: Nathan <nathan@zed.dev>
2025-01-04 01:00:16 +00:00
Marshall Bowers
dd75f85ecf
elm: Extract to zed-extensions/elm repository (#22637)
This PR extracts the Elm extension to the
[zed-extensions/elm](https://github.com/zed-extensions/elm) repository.

Release Notes:

- N/A
2025-01-04 00:00:45 +00:00
Marshall Bowers
4bd5f0d355
racket: Extract to zed-extensions/racket repository (#22630)
This PR extracts the Racket extension to the
[zed-extensions/racket](https://github.com/zed-extensions/racket)
repository.

Release Notes:

- N/A
2025-01-03 22:04:50 +00:00
Marshall Bowers
fdbf3d0f25
clojure: Extract to zed-extensions/clojure repository (#22628)
This PR extracts the Clojure extension to the
[zed-extensions/clojure](https://github.com/zed-extensions/clojure)
repository.

Release Notes:

- N/A
2025-01-03 21:14:53 +00:00