bcdae9f
Add settings to hide/show navigation history buttons (#10240)
Click to expand commit body
This is another variant for this [original
PR](https://github.com/zed-industries/zed/pull/10091) to add settings to
show/hide navigation history buttons that puts the settings under a new
section called `tab_bar`:
```
"tab_bar": {
// Whether or not to show the navigation history buttons.
"show_nav_history_buttons": true
}
```
<img width="314" alt="Screenshot 2024-04-02 at 3 00 53 PM"
src="https://github.com/zed-industries/zed/assets/1253505/23c4fa19-5a63-4160-b3b7-1b5e976c36bf">
<img width="329" alt="Screenshot 2024-04-02 at 3 01 03 PM"
src="https://github.com/zed-industries/zed/assets/1253505/64c2ebd2-9311-4589-a4e8-bd149c6c4ece">
Release Notes:
fixes #9995 being able to target constants
<img width="336" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/9e8cc438-10c4-441f-9140-3f4b418bd3bd">
Adds highlighting for parameters In blocks
<img width="318" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/4fa45fbe-104b-4778-994b-3b6d6ba930d4">
Ben Hamment
created
4f9ad30
tasks: Use icons instead of secondary text in a modal (#10264)
Fixes #4380
Parts im still unsure about:
- [x] where exactly I should call `on_lsp_start`/`on_lsp_end`
- [x] how to handle things better than `let is_references =
TypeId::of::<R>() == TypeId::of::<GetReferences>();`, which feels very
janky
- [x] I want to have the message be something like `"Finding references
to [...]"` instead of just `textDocument/references`, but I'm not sure
how to retrieve the name of the symbol that's being queried
- [ ] I think the bulk of the runtime is occupied by `let result =
language_server.request::<R::LspRequest>(lsp_params).await;`, but since
`ModelContext` isn't passed into it, I'm not sure how to update progress
from within that function
- [x] A good way to disambiguate between multiple calls to the same lsp
function; im currently using the function name itself as the unique
identifier for that request, which could create issues if multiple
`textDocument/references` requests are sent in parallel
Any help with these would be deeply appreciated!
Release Notes:
- Adds a status indicator for LSP actions
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Daniel Zhu
and
Mikayla
created
c7961b9
Implement ObjectFit::ScaleDown for images (#10063)
Click to expand commit body
While working towards fixes for the image viewer, @mikayla-maki and I
discovered that we didn't have `object-fit: scale-down` implemented.
This doesn't _fully_ solve the image issues as there is some issue where
only the bounds width is updating on layout change that I haven't fully
chased down.
Co-Authored-By: @mikayla-maki
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Kyle Kelley
and
Mikayla Maki
created
c64c275
Fix reference to `soft_wrap` option in comment (#10239)
Click to expand commit body
Brought this up briefly in Discord:
https://discord.com/channels/869392257814519848/873293828805771284/1226224505760776192
Release Notes:
- Fixed an incorrect reference to the `soft_wrap` setting in the default
settings documentation.
1. They now will not go off-screen
2. You can scroll long messages.
3. Only one notification per language server is shown at a time
4. The title/text are now distinguished visually
5. You can copy the error message to the clipboard
Fixes: #10217
Fixes: #10190
Fixes: #10090
Release Notes:
- Fixed language server notifications being too large
([#10090](https://github.com/zed-industries/zed/issues/10090)).
Conrad Irwin
created
3aa242e
Disable format on save for C and C++ (#10141)
Click to expand commit body
We want Zed to be opinionated and low-configuration. Your code editor
should get out of the way, and just do the right thing.
However, some ecosystems aren't opinionated enough for us to
automatically detect the right way to format your code, so let's turn it
off.
Release Notes:
- Disabled `format_on_save` by default in C and C++.
Mikayla Maki
created
518cfdb
Adjust env parsing to account for multiline env values (#10216)
bf9b443
vim: Support gn command and remap gn to gl (#9982)
Click to expand commit body
Release Notes:
- Resolves #4273
@algora-pbc /claim #4273
This is a work-in-progress. The process for `gn` command is:
- maintain updated vim.workspace_state.search.initial_query
- modify editor.select_next_state with
vim.workspace_state.search.initial_query
- use editor.select_next()
- merge selections
- set editor.select_next_state to previous state
To make this possible, several private members and editor structures are
made public. `gN` is not yet implemented and the cursor still does not
jump to the next selection in the first use.
Maybe there is an better way to do this?
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
joaquin30
and
Conrad Irwin
created
fe4b345
Fix interpretation of \n in hovers (#10214)
Click to expand commit body
I ran into this specifically when looking at the documentation of
https://crates.io/crates/wayland-client
Release Notes:
- Fixed a bug where some hover popovers would render `\n` instead of a
new line.
Mikayla Maki
created
7b636d9
Limit the extension tasks in the modal to current language only (#10207)
Click to expand commit body
Release Notes:
- N/A
Kirill Bulatov
created
c851e6e
Add `language_server_workspace_configuration` to extension API (#10212)
Click to expand commit body
This PR adds the ability for extensions to implement
`language_server_workspace_configuration` to provide workspace
configuration to the language server.
We've used the Dart extension as a motivating example for this, pulling
it out into an extension in the process.
Release Notes:
- Removed built-in support for Dart, in favor of making it available as
an extension. The Dart extension will be suggested for download when you
open a `.dart` file.
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Marshall Bowers
,
Max
, and
Max Brunsfeld
created
4aaf345
Improve extension API documentation (#10210)
Click to expand commit body
This PR adds more documentation for various constructs in the
`zed_extension_api` crate.
`wit_bindgen` is able to generate doc comments on the Rust constructs
using the the doc comments in the WIT files, so we're able to leverage
that for the majority of the constructs that we expose.
Release Notes:
- N/A
Marshall Bowers
created
b05aa38
Handle old versions of `/usr/bin/env` when loading shell env (#10202)
Click to expand commit body
This fixes #9786 by using an invocation of `/usr/bin/env` that's
supported by macOS 12.
As it turns out, on macOS 12 (and maybe 13?) `/usr/bin/env` doesn't
support the `-0` flag. In our case it would silently fail, since we
`exit 0` in our shell invocation and because the program we run and
whose exit code we check is the `$SHELL` and not `/usr/bin/env`.
What this change does is to drop the `-0` and instead split the
environment on `\n`. This works even if an environment variable contains
a newline character because that would then be escaped.
Release Notes:
- Fixed Zed not picking up shell environments correctly when running on
macOS 12. ([#9786](https://github.com/zed-industries/zed/issues/9786)).
Co-authored-by: Dave Smith <davesmithsemail@gmail.com>
Thorsten Ball
and
Dave Smith
created
ec6efe2
Fix crash when joining two consecutive lines (#10000)
Click to expand commit body
Release notes:
- Fixed a crash when joining two consecutive lines
([#9692](https://github.com/zed-industries/zed/pull/9692)).
This crash is not caused by `vim` or `editor`'s code logic, `join_line`
logic is okay, I found that the crash is caused by a refresh of git
`diff` after every update, hhen git diff generates hunks, it will look
for the cursor to the beginning of a line, and judge that if the cursor
result column is greater than 0, that is, it is not the beginning of a
line, it will correct the row to the next line, I think before we forgot
here that I need to adjust the column to 0 at the same time, otherwise
it is easy to go out of bounds, I am not sure if I need to add more
tests for this method, I can add if I need to, but I feel that this case
is a bit extreme
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
1737329
Use existence of issue_reference_number flag to determine if prod
Joseph T. Lyons
created
3ae6463
Fix scrollbar markers in large files (#10181)
Click to expand commit body
#10080 introduced a minor change in how the min marker height is
enforced. Before the change, it was applied to the aggregated marker,
but after the change it's applied to each individual marker before
aggregation.
The difference is not noticeable on small files, where even single row
markers are higher than `MIN_MARKER_HEIGHT`, but it leads to visible
differences in large files with repeating blocks of highlighted and
not-highlighted blocks, like in [this
case](https://github.com/zed-industries/zed/pull/9080#issuecomment-2006796376).
This PR fixes how the `MIN_MARKER_HEIGHT` is applied.
Before the fix:
<img width="727" alt="zed-scroll-markers-before"
src="https://github.com/zed-industries/zed/assets/2101250/a1c34746-af4f-4054-8de2-edabf3db7cee">
After the fix:
<img width="736" alt="zed-scroll-markers-after"
src="https://github.com/zed-industries/zed/assets/2101250/b9ee843d-055e-42a6-af26-e7fd4f7729f8">
Release Notes:
- N/A
/cc @mrnugget
Andrew Lygin
created
773a3e8
Don't require an issue number while in dev mode
73d8a43
vim: Allow `:` in empty panes and screen shares (#10171)
Click to expand commit body
Release Notes:
- vim: Fixed `:` when no files are open
Conrad Irwin
created
4a32561
Add `label_for_symbol` to extension API (#10179)
Click to expand commit body
This PR adds `label_for_symbol` to the extension API.
As a motivating example, we implemented `label_for_symbol` for the
Haskell extension.
Release Notes:
- N/A
Co-authored-by: Max <max@zed.dev>
Marshall Bowers
and
Max
created
5d88d9c
markdown preview: Add link tooltips (#10161)
Click to expand commit body
Adds tooltips to the markdown preview, similar to how its done for
`RichText`
https://github.com/zed-industries/zed/assets/53836821/523519d4-e392-46ef-9fe0-6692871b317d
Release Notes:
- Added tooltips when hovering over links inside the markdown preview
Bennet Bo Fenner
created
dde87f6
markdown preview: Auto detect raw links (#10162)
Click to expand commit body
Similar to the work done in `rich_text`, raw links now get picked up in
the markdown preview.
https://github.com/zed-industries/zed/assets/53836821/3c5173fd-cf8b-4819-ad7f-3127c158acaa
Release Notes:
- Added support for detecting and highlighting links in markdown preview
Bennet Bo Fenner
created
d306b53
Add `label_for_completion` to extension API (#10175)
Click to expand commit body
This PR adds the ability for extensions to implement
`label_for_completion` to customize completions coming back from the
language server.
We've used the Gleam extension as a motivating example, adding
`label_for_completion` support to it.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Marshall Bowers
,
Max
, and
Max Brunsfeld
created
0f1c2e6
Return back the ability to save non-dirty singleton buffers (#10174)
Kirill Bulatov
created
0861cea
Add `yield` keyword highlight for Rust (#10104)
Click to expand commit body
Release Notes:
- Added `yield` keyword highlight for Rust
Ref:
- https://github.com/rust-lang/rust-analyzer/pull/7209
-
https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting/highlight.rs#L177
-
https://doc.rust-lang.org/reference/keywords.html?highlight=yield#reserved-keywords
In VS Code:

docs.rs:
https://docs.rs/async-stream/latest/async_stream/macro.try_stream.html

## Before
<img width="644" alt="image"
src="https://github.com/zed-industries/zed/assets/5518/da349187-57e6-4cea-b3e3-f628ce6a99e8">
## After update in Zed

Jason Lee
created
1c485a0
tasks: change placeholder text in a modal (#10166)
Click to expand commit body
Related to: #10132
Release Notes:
- N/A
Piotr Osiewicz
created
7d1a5d2
zed-local: add --stable flag to zed-local (#10165)
Click to expand commit body
`--stable` makes all clients except for the first one use a stable
version of Zed (hardcoded to `/Applications/Zed/Contents/MacOS/zed` for
now).
That should make testing cross-channel collab changes a bit easier. /cc
@maxbrunsfeld @ConradIrwin
Release Notes:
- N/A
Piotr Osiewicz
created
27165e9
channel chat: Set first loaded message ID when sending a message (#10034)
Click to expand commit body
Discovered while looking into #10024.
When clicking on a reply message text, the original message should be
highlighted accordingly. However this would not work when the channel
was just created and the user is the only one that sent messages.
Release Notes:
- Fixed highlighting of messages when clicking on the reply message text
in the chat and there were no other messages from other users
Introduce `VariableName` enum to simplify Zed task templating
management: now all the variables can be looked up statically and can be
checked/modified in a centralized way: e.g. `ZED_` prefix is now added
for all such custom vars.
Release Notes:
- N/A
When leaving a call/room in which a project was shared, the shared
project notification was not getting dismissed when the person that
shared the project left the room.
Although there was a `cx.emit(Event::Left)` call inside room, the event
was never received in the `project_shared_notification` module, because
the room is dropped before the event can be dispatched. Moving the
`cx.emit(Event::Left)` to the active call fixed the problem. Also
renamed `Event::Left` to `Event::RoomLeft` because the room join
equivalent is also called `Event::RoomJoined`.
Release Notes:
- Fixed project shared notification staying open, when the user that
shared the project left the room
Bennet Bo Fenner
created
8e9543a
Improve handling of prettier errors on format (#10156)
Click to expand commit body
When no formatter for a language is specified, Zed has the default
behaviour:
1. Attempt to format the buffer with `prettier`
2. If that doesn't work, use the language server.
The problem was that if `prettier` failed to format a buffer due to
legitimate syntax errors, we simply did a fallback to the language
server, which would then format over the syntax errors.
With JavaScript/React/TypeScript projects this could lead to a situation
where
1. Syntax error was introduced
2. Prettier fails
3. Zed ignores the error
4. typescript-language-server formats the buffer despite syntax errors
This would lead to some very weird formatting issues.
What this PR does is to fix the issue by handling `prettier` errors and
results in two user facing changes:
1. When no formatter is set (or set to `auto`) and if we attempted to
start a prettier instance to format, we will now display that error and
*not* fall back to language server formatting.
2. If the formatter is explicitly set to `prettier`, we will now show
errors if we failed to spawn prettier or failed to format with it.
This means that we now might show *more* errors than previously, but I
think that's better than not showing anything to the user at all.
And, of course, it also fixes the issue of invalid syntax being
formatted by the language server even though `prettier` failed with an
error.
Release Notes:
- Improved error handling when formatting buffers with `prettier`.
Previously `prettier` errors would be logged but ignored. Now `prettier`
errors are shown in the UI, just like language server errors when
formatting. And if no formatter is specified (or set to `"auto"`) and
Zed attempts to use `prettier` for formatting, then `prettier` errors
are no longer skipped. That fixes the issue of `prettier` not formatting
invalid syntax, but its error being skipped, leading to
`typescript-language-server` or another language server formatting
invalid syntax.
Thorsten Ball
created
c0d1171
Fix clear reply to message and edit message state when you switch state (#10044)
Click to expand commit body
This pull request fixes the following issue #10042.
Release Notes:
- Fixed clear chat state when switching edit/reply message state.
([#10042](https://github.com/zed-industries/zed/issues/10042)).
Remco Smits
created
9cbde74
Refactor selection expansion logic into a separate method (#10117)
Click to expand commit body
Release Notes:
- N/A
This commit introduces a new method `range` to calculate the target
range for selection expansion based on the current selection, movement
times, and other parameters. The `expand_selection` method is refactored
to use this new `range` method, simplifying the logic for expanding a
selection and making the code more modular and reusable. The `range`
method encapsulates the logic for calculating the new selection range,
including handling linewise selection and adjustments for surrounding
newlines, making it easier to understand and maintain the selection
expansion functionality.
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Release Notes:
- Fixed panic in tasks modal (Preview only).
Piotr Osiewicz
created
79272b7
extensions: Add author to the manifest (#10134)
Click to expand commit body
Related to #9910
Also, this PR will add a release note, since I've missed that in the
original PR.
Release Notes:
- Added Emmet language extension to the extension store.
49c53bc
Extract HTML support into an extension (#10130)
Click to expand commit body
This PR extracts HTML support into an extension and removes the built-in
HTML support from Zed.
Release Notes:
- Removed built-in support for HTML, in favor of making it available as
an extension. The HTML extension will be suggested for download when you
open a `.html`, `.htm`, or `.shtml` file.
Marshall Bowers
created
256b446
Refactor LSP adapter methods to compute labels in batches (#10097)
Click to expand commit body
Once we enable extensions to customize the labels of completions and
symbols, this new structure will allow this to be done with a single
WASM call, instead of one WASM call per completion / symbol.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld
,
Marshall Bowers
, and
Marshall
created