Adds support for [Goto
Declaration](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_declaration)
LSP command.
I am particularly interested in [this for Rust
projects](https://rust-analyzer.github.io/manual.html#go-to-declaration),
to be able to navigate to the place where a trait method is declared,
coming from a trait method implementation.
I noticed this was something I could do in VSCode before, but was
somehow missing is Zed. Thanks to the already existing infrastructure
for Goto Definition, I just followed and copy-paste-adapted it for Goto
Declaration.
As a bonus, I added `ctrl-F12` and `alt-ctrl-F12` as default macOS
keybindings for `GoToDeclaration` and `GoToDeclarationSplit`,
respectively. They are not keybindings from another editor, but I
figured they made sense to be grouped along with the other *F12
commands.
### Release Notes:
- Added "Go to declaration" editor action.
- vim: Breaking change to keybindings after introduction of the `Go to
declaration` editor action. The new keybindings are the following (and
can be found [here](https://zed.dev/docs/vim), alongside the other key
bindings):
- `g d` - Go to definition
- `g D` - Go to declaration
- `g y` - Go to type definition
- `g I` - Go to implementation
https://github.com/user-attachments/assets/ee5c10a8-94f0-4e50-afbb-6f71db540c1b
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Luis Cossío
and
Thorsten Ball
created
82db5de
terminal: Fix context menu keybindings flicker (#15771)
1f97741
linux: Add shortcuts for left/right keys in prompts (#15779)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/15151
Release Notes:
- Fixed prompts on Linux not being navigable by arrow keys
([#15151](https://github.com/zed-industries/zed/issues/15151)).
apricotbucket28
created
45afe9d
ruby: Add support for *.rbs files (#15778)
Click to expand commit body
Hi, this pull request adds support for RBS files for the Ruby language.
[RBS](https://github.com/ruby/rbs) is a language to describe the
structure of Ruby programs.
This pull request:
- adds a new grammar to the Ruby extension for RBS
https://github.com/joker1007/tree-sitter-rbs
- configures the Ruby extension to use the added grammar.
Release Notes:
- N/A
Vitaly Slobodin
created
ca95113
collab: Add support for more providers to the LLM service (#15832)
Click to expand commit body
This PR adds support for additional providers to the LLM service:
- OpenAI
- Google
- Custom Zed models (through Hugging Face)
Release Notes:
- N/A
Marshall Bowers
created
8e9c2b1
Introduce a separate backend service for LLM calls (#15831)
Click to expand commit body
This PR introduces a separate backend service for making LLM calls.
It exposes an HTTP interface that can be called by Zed clients. To call
these endpoints, the client must provide a `Bearer` token. These tokens
are issued/refreshed by the collab service over RPC.
We're adding this in a backwards-compatible way. Right now the access
tokens can only be minted for Zed staff, and calling this separate LLM
service is behind the `llm-service` feature flag (which is not
automatically enabled for Zed staff).
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Max Brunsfeld
,
Marshall
, and
Marshall Bowers
created
4ed43e6
collab: Ignore Stripe events that are older than an hour (#15830)
Click to expand commit body
This PR makes it so any Stripe events we receive that occurred over an
hour ago are marked as processed.
We don't want to process an old event long after it occurred and
potentially overwrite more recent updates.
This also makes running collab locally a bit nicer, as we won't be
getting errors for a bunch of older events that will never get processed
successfully.
The period after time after which we consider an event "stale" can be
modified, as needed.
Release Notes:
- N/A
Release Notes:
- Added logging in debug mode of raw kernel output from REPL.
- Fixed REPL kernels not being shut down completely on close of Editor
Kyle Kelley
created
ab1fabe
gpui: Align SVG sprites to whole pixels (#15822)
Click to expand commit body
Related to https://github.com/zed-industries/zed/issues/12352 (and old
issue https://github.com/zed-industries/zed/issues/643)
This fixes visual glitches that could happen when rendering icons on
Linux and Windows (and in the Blade backend)



Release Notes:
- Linux: Fixed visual glitches when rendering icons.
apricotbucket28
created
27779e3
Refactor: Restructure collab main function to prepare for new subcommand: `serve llm` (#15824)
Click to expand commit body
This is just a refactor that we're landing ahead of any functional
changes to make sure we haven't broken anything.
Release Notes:
- N/A
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Max Brunsfeld
,
Marshall
, and
Jason
created
705f7e7
collab: Include `geoip_country_code` in initial span (#15819)
Click to expand commit body
This PR changes how we report the `geoip_country_code` in the tracing
spans.
I wasn't seeing it come through in the logs, and I think it was because
we didn't declare the field on the initial span.
Release Notes:
- N/A
Marshall Bowers
created
04ad088
assistant: Remove old model selector code (#15817)
Click to expand commit body
This PR removes the old model selector code, as it was no longer used
after #15693.
Release Notes:
- N/A
Marshall Bowers
created
03cc18d
assistant-panel: Update model selector to a combo-box (#15693)
Click to expand commit body
This updates the model selector to be a combobox (filterable list)
This PR causes the following regression: There is no longer a message in
the inline assistant explaining context is included from the assistant
panel. Will follow up with some sort of solution soon.
Before:

After:


Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
Nate Butler
and
Marshall Bowers
created
f11f3f2
collab: Attach GeoIP country code to RPC sessions (#15814)
Click to expand commit body
This PR updates collab to attach the user's GeoIP country code to their
RPC session.
We source the country code from the
[`CF-IPCountry`](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry)
header.
Release Notes:
- N/A
Marshall Bowers
created
be0ccf4
assistant: Show error messages in popover notification (#15808)
0fba364
assistant panel: Show Zed AI notice & configuration hint (#15798)
Click to expand commit body
This adds two possible notices to the assistant panel:
- Shows notice if currently selected provider is not configured
- Shows notice if user is signed-out and (does not have provider OR
provider is zed.dev) and tells user to sign in
Design needs to be tweaked. cc @iamnbutler

Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
Thorsten Ball
and
Bennet
created
d997771
assistant: Fix prompts not being editable (#15796)
Click to expand commit body
Fixes a bug introduced in #15615, where prompts could not be edited in
the prompt library.
This PR fixes the behavior by only preventing users to edit built-in
prompts.
Release Notes:
- N/A
Bennet Bo Fenner
created
559ce87
linux: Save opened workspace when closing last window (#15754)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/15642
(also fixes a bug where replacing a workspace in the same window would
reopen the old project after closing with `CTRL + Q`)
Release Notes:
- Linux: Fixed last workspace not being restored on startup
([#15642](https://github.com/zed-industries/zed/issues/15642)).
- Fixed a bug where a closed workspace could be reopened on startup.
apricotbucket28
created
0ec29d6
Restructure workflow step resolution and fix inserting newlines (#15720)
49e736d
ruby: Recognize `Steepfile`s as Ruby (#15762)
Click to expand commit body
Release Notes:
- N/A
Reese is on Codeberg
created
f8234ae
repl: Add ctrl-alt-enter binding to run in place (#15743)
Click to expand commit body
Release Notes:
- Added `ctrl-alt-enter` keybinding for `repl::RunInPlace`
(`ctrl-option-enter` on MacOS). Keeps your screen position and cursor in
place when running any block.
Kyle Kelley
created
b7eae7f
repl: Render markdown output from kernels (#15742)
Click to expand commit body
<img width="1268" alt="image"
src="https://github.com/user-attachments/assets/73e03a28-f5e3-4395-a58c-cabd07f57889">
Release Notes:
- Added markdown rendering for Jupyter/REPL outputs. Push Markdown from
Deno/Typescript with `Deno.jupyter.md` and in IPython use
`IPython.display.Markdown`.
Kyle Kelley
created
36b61a8
repl: Process display IDs for updatable displays (#15738)
Click to expand commit body
Release Notes:
- Added `update_display_data` support for REPL.
https://github.com/user-attachments/assets/d618e457-e314-482e-954a-6384f185629a
Kyle Kelley
created
68446d2
Use lowercase command names in initial settings files (#15717)
Click to expand commit body
Release Notes:
- N/A
Making these two comments match what I see in the command palette:
<img width="629" alt="Xnapper-2024-08-03-08 09 26"
src="https://github.com/user-attachments/assets/f3eab05b-1560-4b0a-8df2-0eaf5746e422">
Adam Johnson
created
4528e9d
repl: Create better terminal output for REPL stdio (#15715)
Click to expand commit body
Rely on our implementation of a GPUI powered alacritty terminal to
render stdout & stderr from the repl.
Release Notes:
- Fixed ANSI escape code and carriage return handling in repl outputs
(https://github.com/zed-industries/zed/issues/15640,
https://github.com/zed-industries/zed/issues/14855)
https://github.com/user-attachments/assets/bd3f1584-863a-4afa-b60b-9d222a830ff8
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Kyle Kelley
and
Mikayla
created
b6a3556
repl: Rely on block decorations to size according to content (#15713)
Click to expand commit body
We no longer have to use line height calculations now that
https://github.com/zed-industries/zed/pull/15536 is in. Blocks resize
according to their content. This fixes up some of the rendering issues
on plaintext outputs as well.
Release Notes:
- Fix repl plain text output wrapping around and covering editor text
(https://github.com/zed-industries/zed/issues/15491,
https://github.com/zed-industries/zed/issues/14855)
Kyle Kelley
created
5c54596
theme: Use a non-transparent color for the fallback `title_bar.inactive_background` (#15709)
Click to expand commit body
This PR changes the fallback color for the
`title_bar.inactive_background` theme property so that the title bar
doesn't just disappear when a theme doesn't have a value set.
You're welcome, @naomieow.
Release Notes:
- linux: Changed the fallback color of `title_bar.inactive_background`
to a non-transparent value.
Marshall Bowers
created
91bbf0e
assistant: Normalize line endings for prompts loaded from the prompt library (#15708)
Click to expand commit body
This PR makes it so we normalize the line endings for prompts to LFs
(`\n`) when we load a prompt from the library.
In some cases, prompts could end up with CRLF (`\r\n`) line endings.
When these prompts were used with the `/prompt` slash command and
summarily run, the prompt text would be converted into a rope, causing
the line endings to be normalized to LFs.
However, this would happen _after_ the ranges for the
`SlashCommandOutputSection`s were computed based on the text that still
contained the CRLFs. This would then cause these ranges to be invalid
for the text with the normalized endings, resulting in a panic when
converting them to anchors.
Fixes https://github.com/zed-industries/zed/issues/15652.
Release Notes:
- N/A
Co-authored-by: Max <max@zed.dev>
Marshall Bowers
and
Max
created
3755f0d
docs: Fix links to "Backend dependencies" setup (#15706)
Click to expand commit body
This PR fixes the links to the "Backend dependencies" section from the
local collaboration docs.
We now provide links to the section in the platform-specific development
docs.
Release Notes:
- N/A
This PR removes some `unwrap`s while loading the built-in step
resolution prompt.
While these `unwrap`s are safe today, they are relying on some implicit
contracts that might change in the future. We're using this in a context
where it's easy to propagate an error upwards, so we may as well avoid
the `unwrap`s entirely and use a `Result`.
Release Notes:
- N/A
Marshall Bowers
created
24afe7c
Change the terminal assistant settings icon (#15702)
Click to expand commit body
Change the terminal assistant settings icon so its consistent with the one we're using on the inline assistant.
---
Release Notes:
- N/A
Danilo Leal
created
d6e558e
copilot: Colocate `copilot_chat_config_path` with the rest of the Copilot code (#15703)
Click to expand commit body
This PR moves the `copilot_chat_config_path` out of `paths` and into
`copilot` with the rest of the Copilot code.
Since this doesn't actually return a Zed path, it doesn't belong in
`paths`.
Release Notes:
- N/A
Marshall Bowers
created
e2eb68a
chore: Remove leftover code from #15646 (#15697)
Click to expand commit body
Release Notes:
- N/A
Piotr Osiewicz
created
ad11d83
Skip over folded regions when iterating over multibuffer chunks (#15646)
Click to expand commit body
This commit weaves through new APIs for language::BufferChunks, multi_buffer::MultiBufferChunks and inlay_map::InlayChunks that allow seeking with an upper-bound. This allows us to omit doing syntax highligting and looking up diagnostics for folded ranges. This in turn directly improves performance of assistant panel with large contexts.
Release Notes:
- Fixed poor performance when editing in the assistant panel after
inserting large files using slash commands
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
TODOs for follow-up:
- [ ] When opening panel: nudge user to sign in if they're not signed-in
and have no provider configured (or if they're not signed-in and have
Zed AI configured)
- [ ] Configuration page is not scrollable
- [ ] Design tweaks
Current status:
https://github.com/user-attachments/assets/d26d65ea-43e8-481b-81a3-b3cba01704a8
Release Notes:
- N/A
This commit updates the Tree-sitter query to match Rust attributes
containing the word "test". The previous query only matched attributes
with the exact string "test", which was too restrictive for custom test
macros like https://docs.rs/test-log/0.2.10/test_log/#
Discussion - https://github.com/zed-industries/zed/discussions/15580
Mayank Jikadara
created
b88b9dc
Extend symbol ranges by their annotation range when suggesting edits (#15677)
e4608e7
assistant panel: Intermediate fix for focus problems (#15674)
Click to expand commit body
This is an intermediate fix for the focus problems in the assistant
panel. Intermediate because I'm going to shred the whole
ConfigurationView now and replace the tabs inside with a list.
Release Notes:
- N/A
5e011ab
language_model: Denote the availability of language models (#15660)
Click to expand commit body
This PR updates the `LanguageModel` trait with a new method for denoting
the availability of a model.
Right now we have two variants:
- `Public` for models that have no additional restrictions (other than
their respective setup/authentication requirements)
- `RequiresPlan` for models that require a specific Zed plan
Release Notes:
- N/A
Marshall Bowers
created
906d973
gleam: Update Tree-sitter grammar for label shorthand syntax (#15659)
Click to expand commit body
This PR updates the Gleam Tree-sitter grammar to support label shorthand
syntax.
Release Notes:
- N/A
Marshall Bowers
created
771424e
extension: Make `worktree` argument to `run_slash_command` optional (#15658)
Click to expand commit body
This PR updates the extension API to make the `worktree` argument to
`run_slash_command` optional.
We may not always have a worktree, and not all slash commands need them,
so by making it optional we can allow individual slash commands to
decide what to do when there is no worktree.
Release Notes:
- N/A
Marshall Bowers
created
88f29c8
assistant: Don't require a worktree to run slash commands (#15655)
Click to expand commit body
This PR fixes an issue where slash commands were not able to run when
Zed did not have any worktrees opened.
This requirement was only necessary for slash commands originating from
extensions, and we can enforce the presence of a worktree just for
those:
<img width="378" alt="Screenshot 2024-08-01 at 5 01 58 PM"
src="https://github.com/user-attachments/assets/38bea947-e33b-4c64-853c-c1f36c63d779">
Release Notes:
- N/A
- The secrets portal is only used if the application is sandboxed
without access to the org.freedesktop.secrets on the host but as zed is
not really working correctly if sandboxed as is, it is better to
completely omit that part
- The org.freedestkop.secrets is not a portal but a spec file that is
implemented by both gnome in gnome-keyring, kde in kwallet but also by
other password managers like keepassxc and it is a requirement for a
"correctly" set up linux desktop so just remove that wrongly documented
bit
Release Notes:
- N/A