File finder looks and feels a little bulky now. It duplicates file names
and consumes too much space for each file.
This PR makes it more compact:
- File name is trimmed from the path, removing duplication
- Path is placed to the right of the file name, improving space usage
- Path is muted and printed in small size to not distract attention from
the main information (file names)
It makes search results easier to look through, consistent with the
editor tabs, and closer in terms of usage to mature editors.
Release Notes:
- File finder UI enhancement
Andrew Lygin
created
91303a5
Do not run scheduled CI jobs on forks (#7394)
Click to expand commit body
Runs scheduled CI jobs only on the main repository, not on forks. These
jobs fail on forks and generate unnecessary noise on contributor emails.
Release Notes:
- N/A
Release Notes:
- Added syntax highlighting for [Beancount](https://beancount.github.io)
Conrad Irwin
created
4195f27
Fix hover links in channel buffers (#7393)
Click to expand commit body
Release Notes:
- N/A
Conrad Irwin
created
583ce44
Fix cmd+k in terminal and fix sporadic keybind misses (#7388)
Click to expand commit body
This fixes `cmd+k` in the terminal taking 1s to have an effect. It is
now immediate.
It also fixes #7270 by ensuring that we don't set a bad state when
matching keybindings.
It matches keybindings per context and if it finds a match on a lower
context it doesn't keep pending keystrokes. If it finds two matches on
the same context level, requiring more keystrokes, then it waits.
Release Notes:
- Fixed `cmd-k` in terminal taking 1s to have an effect. Also fixed
sporadic non-matching of keybindings if there are overlapping
keybindings.
([#7270](https://github.com/zed-industries/zed/issues/7270)).
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Thorsten Ball
,
Conrad
, and
Conrad Irwin
created
47329f4
Add `search.match_background` colors to bundled themes (#7385)
Click to expand commit body
This PR populates the `search.match_background` colors in the bundled
themes, using the values from the Zed1 themes.
Release Notes:
- Added theme-specific `search.match_background` colors to built-in
themes.
Marshall Bowers
created
223f45c
Remove default keybinds for navigating between docks/editors (#7381)
Click to expand commit body
Turns out that these keybindings are active in Vim *and* in non-Vim mode
and they shadow `Ctrl-w` in terminals.
We should fix `Ctrl-w` being shadowed, but until then let's remove the
default keybindings.
Release Notes:
- N/A
Co-authored-by: Kirill <kirill@zed.dev>
Co-authored-by: Conrad <Conrad@zed.dev>
Thorsten Ball
,
Kirill
, and
Conrad
created
d742b3b
Mark the window as dirty when first opening it (#7384)
Click to expand commit body
Otherwise we won't display anything if the window never notifies.
Release Notes:
- N/A
Co-authored-by: Nathan <nathan@zed.dev>
Antonio Scandurra
and
Nathan
created
3bf412f
Use window's screen rather than window itself to start display link
Click to expand commit body
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Julia
,
Antonio Scandurra
, and
Nathan Sobo
created
8030e8c
Improve the contrast of the default `search_match_background` colors (#7382)
Click to expand commit body
This PR improves the contrast of the default `search_match_background`
colors.
Release Notes:
- Improved the contrast of the default `search.match_background` colors.
Marshall Bowers
created
45429a4
Fix inlay hints using stale editor data (#7376)
Click to expand commit body
Refactor the hint query code to pass along an actual `cx` instead of its
potentially stale, cloned version.
Release Notes:
- Fixed occasional duplicate hints inserted and offset-related panics
when concurrently editing the buffer and querying multiple its ranges
for hints
That way crates that use Picker::new do not have to codegen constructor of Editor; tl;dr, 10% of LLVM shaved off of crates like vcs_menu or theme_selector in release mode.
Piotr Osiewicz
created
87d3f59
Do not show completion documentation if disabled (#7372)
Click to expand commit body
This fixes #7348 by not rendering completions if they are disabled in
the settings. Previously we only checked that setting when starting or
not starting background threads to fetch documentation. But in case we
already have documentation, this stops it from being rendered.
Release Notes:
- Fixed documentation in completions showing up even when disabled via
`show_completion_documentation`
([#7348](https://github.com/zed-industries/zed/issues/7348))
Hi folks! @absynce and I paired a bit to improve the
`elm-language-server` configuration. We have realised that sometimes
`elm-language-server` settings were being reset to default. We had been
configuring `elm-language-server` like this:
```json
"lsp": {
"elm-language-server": {
"initialization_options": {
"disableElmLSDiagnostics": true,
"onlyUpdateDiagnosticsOnSave": true,
"elmReviewDiagnostics": "warning"
}
}
}
```
And then we noticed that the following communication happened:
```
// Send:
{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
// Receive:
{"jsonrpc":"2.0","id":5,"method":"workspace/configuration","params":{"items":[{"section":"elmLS"}]}}
// Send:
{"jsonrpc":"2.0","id":5,"result":[null],"error":null}
```
In `elm-language-server` the settings from `didChangeConfiguration`
[replace the initial
settings](https://github.com/elm-tooling/elm-language-server/blob/edd68133883f3902f8940a6e5e2834a9cd627dc1/src/common/providers/diagnostics/diagnosticsProvider.ts#L188).
Setting the value to `{}` effectively resets the configuration options
to defaults.
In Zed, `initialization_options` and `workspace_configuration` are two
different things, but in `elm-language-server` they are coupled.
Additionally, `elm-language-server` is requesting workspace
configuration for the `elmLS` section that doesn't exist.
This PR:
1. Fixes settings reset on `didChangeConfiguration` by populating
`workspace_configuration` from `initialization_options`
2. Makes workspace configuration requests work by inserting an extra
copy of the settings under the `elmLS` key in `workspace_configuration`
— this is a bit ugly, but we're not sure how to make both kinds of
configuration messages work in the current setup.
This is how communication looks like after the proposed changes:
```
// Send:
{
"jsonrpc": "2.0",
"method": "workspace/didChangeConfiguration",
"params": {
"settings": {
"disableElmLSDiagnostics": true,
"onlyUpdateDiagnosticsOnSave": true,
"elmReviewDiagnostics": "warning",
"elmLS": {
"disableElmLSDiagnostics": true,
"onlyUpdateDiagnosticsOnSave": true,
"elmReviewDiagnostics": "warning"
}
}
}
}
// Receive:
{
"jsonrpc": "2.0",
"id": 4,
"method": "workspace/configuration",
"params": {
"items": [
{
"section": "elmLS"
}
]
}
}
// Send:
{
"jsonrpc": "2.0",
"id": 4,
"result": [
{
"disableElmLSDiagnostics": true,
"onlyUpdateDiagnosticsOnSave": true,
"elmReviewDiagnostics": "warning"
}
],
"error": null
}
```
Things we have considered:
1. Extracting the `elm-language-server` settings into a separate
section: we haven't found this being widely used in Zed, seems that all
language server configuration should fall under the top level `lsp`
section
2. Changing the way `elm-language-server` configuration works:
`elm-language-server` has got integrations with multiple editors,
changing the configuration behaviour would mean updating all the
existing integrations. Plus we are not exactly sure if it's doing
anything wrong.
Release Notes:
- Improved elm-language-server configuration options
Co-authored-by: Jared M. Smith <absynce@gmail.com>
This re-introduces the changes of #7305 but this time we create a
display link using the `NSScreen` associated with the window. We're
hoping we'll get these frame requests more reliably, and this seems
supported by the fact that awakening my laptop restores the frame
requests.
Release Notes:
- See #7305.
Co-authored-by: Nathan <nathan@zed.dev>
Adds settings for hiding breadcrumbs and quick action bar from
the editor toolbar. If both elements are hidden, the toolbar disappears
completely.
Example:
```json
"toolbar": {
"breadcrumbs": true,
"quick_actions": false
}
```
- It intentionally doesn't hide breadcrumbs in other views (for
instance, in the search result window) because their usage there differ
from the main editor.
- The editor controls how breadcrumbs are displayed in the toolbar, so
implementation differs a bit for breadcrumbs and quick actions bar.
Release Notes:
- Added support for configuring the editor toolbar ([4756](https://github.com/zed-industries/zed/issues/4756))
Andrew Lygin
created
55185c1
Support documentation as a resolvable property (#7306)
Click to expand commit body
Closes #7288
<img width="1800" alt="Screenshot 2024-02-03 at 01 56 14"
src="https://github.com/zed-industries/zed/assets/69181766/ed97ef30-c958-45c8-812c-a59bbbd02b19">
Release Notes:
- Improved LSP `completionItem/resolve` request by supporting `documentation` as a resolvable property
This pull request decreases the size of each instance buffer and shares
instance buffers across windows.
Release Notes:
- Improved GPU memory usage.
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
d08d417
Modify the default tab size of OCaml & OCaml Interface to 2 (#7315)
Click to expand commit body
Thanks @pseudomata for the heads up.
Release Notes:
- N/A
- Add a setting for `vertical_scroll_offset`
- Fix H/M/L in vim with scrolloff
Release Notes:
- Added a settings for `vertical_scroll_offset`
- vim: Fix H/M/L with various values of vertical_scroll_offset
---------
Co-authored-by: Vbhavsar <vbhavsar@gmail.com>
Co-authored-by: fdionisi <code@fdionisi.me>
Added explanations for binding `null` to a keyboard binding.
Release Notes:
- N/A
Tom Planche
created
430f5d5
vim: Convert from visual mode to normal mode with a single click (#6985)
Click to expand commit body
Release Notes:
- Fixed #4319
Here is a demo after the fix:
https://github.com/zed-industries/zed/assets/22256154/a690f146-73c9-4b0e-8527-e4faf690cca2
Actually I'm not really sure should I submit my idea to discussion,
since it's not a large change, and it's something like a bug fix. So I
directly create a pr here.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
WindSoilder
and
Conrad Irwin
created
15edc46
Maintain smooth frame rates when ProMotion and direct mode are enabled (#7305)
Click to expand commit body
This is achieved by starting a `CADisplayLink` that will invoke the
`on_request_frame` callback at the refresh interval of the display.
We only actually draw frames when the window was dirty, or for 2 extra
seconds after the last input event to ensure ProMotion doesn't downclock
the refresh rate when the user is actively interacting with the window.
Release Notes:
- Improved performance when using a ProMotion display with fast key
repeat rates.
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
f2ba969
Dismiss update notification when viewing releases notes (#7297)
Click to expand commit body
After updating zed, a notification is shown in the bottom right with the
new version number, a link to the release notes, and an 'x' to dismiss
the dialog.
Before this PR, clicking the link to the release notes would not dismiss
the modal. So, a user returning to the IDE after viewing the notes in
the browser would still see the notification. With this change, clicking
'View release notes' also dismisses the notification.
Co-authored-by: tomholford <tomholford@users.noreply.github.com>
Release Notes:
- Made update notification to dismiss when viewing releases notes
tomholford
created
2d58226
Avoid logging errors about missing themes dir (#7290)
Kirill Bulatov
created
115f067
gpui: Add support for observing window appearance (#7294)
Click to expand commit body
This PR adds support to GPUI for observing when the appearance of a
window changes.
Based on the initial work done in
https://github.com/zed-industries/zed/pull/6881.
Release Notes:
- N/A
a0b52cc
Scope line layout cache to each window (#7235)
Click to expand commit body
This improves a performance problem we were observing when having
multiple windows updating at the same time, where each window would
invalidate the other window's layout cache.
Release Notes:
- Improved performance when having multiple Zed windows open.
Co-authored-by: Max Brunsfeld <max@zed.dev>
Antonio Scandurra
and
Max Brunsfeld
created
5360c0e
theme_importer: Make VS Code theme parsing more lenient (#7292)
Click to expand commit body
This PR updates the `theme_importer` to use `serde_json_lenient` to
parse VS Code themes.
This should allow us to parse themes that have trailing commas and such,
in addition to the comment support that we already had.
Release Notes:
- N/A
Marshall Bowers
created
3995c22
Use async-native-tls for websockets (#7254)
Click to expand commit body
This change switches from using async_tungstenite::async_tls to
async_tungstenite::async_std with the async-native-tls feature.
The previous feature, async_tls, used async-tls which wraps rustls.
rustls bundles webpki-roots, which is a copy of Mozilla's root
certificates. These certificates are used by default, and manual
configuration is required to support custom certificates, such as those
required by web security gateways in enterprise environments.
Instead of introducing a new configuration option to Zed,
async-native-tls integrates with the platform-native certificate store
to support enterprise environments out-of-the-box. For MacOS, this adds
support for Security.framework TLS. This integration is provided through
openssl-sys, which is also the SSL certificate provider for isahc, the
library underlying Zed's HTTP client. Making websockets and HTTP
communications use the same SSL provider should keep Zed consistent
operations and make the project easier to maintain.
Release Notes:
- Fixed WebSocket communications using custom TLS certificates
([#4759](https://github.com/zed-industries/zed/issues/4759)).
James Roberts
created
659423a
Use `Mutex` instead of a `RefCell` to acquire/release instance buffers (#7291)
Click to expand commit body
This fixes a panic happening when releasing an instance buffer.
Releasing the buffer happens on a different thread but the borrow
checker was not catching it because the metal buffer completion handler
API doesn't have a `Send` marker on it.
Release Notes:
- N/A
This change makes it so that if you are the first to join a channel,
your project is automatically shared.
It also makes it so that if you join a channel via a link and there are
no shared projects, you open the notes instead of an empty workspace
with nothing.
This is to try and address the discoverability of project sharing: we've
had
two reviews that have talked about channels, but not talked about
sharing
projects into them, which makes me suspect they didn't know about the
feature.
Release Notes:
- Added a setting `share_on_join` (defaulting to true). When set, and
you join an empty channel, your project is automatically shared.
Conrad Irwin
created
6f6cb53
Tweak pull request template to (hopefully) make it clearer (#7287)
Click to expand commit body
I keep seeing people leave the wrapping parentheses, like `(Added)` in
their release notes.
This PR tries making it clearer that we only want *one* of "Added",
"Fixed", or "Improved".
Release Notes:
- N/A
Marshall Bowers
created
3d76ed9
Use `command_buffer.wait_until_scheduled` in metal renderer (#7283)
Click to expand commit body
This commit goes back to using `wait_until_scheduled` as opposed to
`wait_until_completed`. What this means, however, is that another draw
could take place before the previous one finished. When that happens we
don't want to reuse the same instance buffer because the GPU is actively
reading from it, so we use a pool instead.
Release Notes:
- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
Thorsten Ball
,
Antonio Scandurra
, and
Antonio
created
Fixes the padding of the "notes" button in collab-ui. I'm not sure why
the previous code used `div().h_7().w_full()`. Am I missing something
here?
### Before

### After

Release Notes:
- Fixed padding of the "notes" button in the collaboration panel.
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Bennet Bo Fenner
and
Marshall Bowers
created
bacb2a2
Add more data into LSP header parsing error contexts (#7282)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/6929
Release Notes:
- N/A
Kirill Bulatov
created
33e5ba6
Revert "Add YAML file type icon (#7185)" (#7286)
Click to expand commit body
This PR reverts the addition of the YAML icon, as it doesn't look good
at the moment:
<img width="305" alt="Screenshot 2024-02-02 at 10 55 16 AM"
src="https://github.com/zed-industries/zed/assets/1486634/2fe2ddd5-5b73-4c52-a121-562d07352005">
This reverts commit a853a80634149ad5d069c48c4a0ece0bd584b5b1.
Release Notes:
- N/A
Marshall Bowers
created
11bd288
editor: Add MoveUpByLines and MoveDownByLines actions (#7208)
Click to expand commit body
This adds four new actions:
- `editor::MoveUpByLines`
- `editor::MoveDownByLines`
- `editor::SelectUpByLines`
- `editor::SelectDownByLines`
They all take a count by which to move the cursor up and down.
(Requested by Adam here:
https://twitter.com/adamwathan/status/1753017094248018302)
Example `keymap.json` entries:
```json
{
"context": "Editor",
"bindings": [
"alt-up": [ "editor::MoveUpByLines", { "lines": 3 } ],
"alt-down": [ "editor::MoveDownByLines", { "lines": 3 } ],
"alt-shift-up": [ "editor::SelectUpByLines", { "lines": 3 } ],
"alt-shift-down": [ "editor::SelectDownByLines", { "lines": 3 } ]
]
}
```
They are *not* bound by default, so as to not conflict with the
`alt-up/down` bindings that already exist.
Release Notes:
- Added four new actions: `editor::MoveUpByLines`,
`editor::MoveDownByLines`, `editor::SelectUpByLines`,
`editor::SelectDownByLines` that can take a line count configuration and
move the cursor up by the count.
### Demo
https://github.com/zed-industries/zed/assets/1185253/e78d4077-5bd5-4d72-a806-67695698af5d
https://github.com/zed-industries/zed/assets/1185253/0b086ec9-eb90-40a2-9009-844a215e6378
Thorsten Ball
created
01ddf84
completions: do not render empty multi-line documentation (#7279)
Click to expand commit body
I ran into this a lot with Go code: the documentation would be empty so
we'd display a big box with nothing in it.
I think it's better if we only display the box if we have documentation.
Release Notes:
- Fixed documentation box in showing up when using auto-complete even if
documentation was empty.
## Before

## After

This pull request implements support for the [OCaml
Language](https://ocaml.org/).
### Additions
- [x]
[tree-sitter-ocaml](https://github.com/tree-sitter/tree-sitter-ocaml)
grammar
- [x] Highlight, Indents, Outline queries
- [x] A new file icon for .ml(i) files. Based on
[ocaml/ocaml-logo](https://github.com/ocaml/ocaml-logo/blob/master/Colour/SVG/colour-transparent-icon.svg)
- [x] LSP Integration with
[ocaml-language-server](https://github.com/ocaml/ocaml-lsp)
- [x] Completion Labels
- [x] Symbol Labels
### Bug Fixes
- [x] Improper parsing of LSP headers.
### Missing [will file a separate issue]
- Documentation on completionItem, requires: `completionItem/resolve`
with support for `documentation` as a provider.
### Screenshots
<details><summary>Zed</summary>
<img width="1800" alt="Screenshot 2024-02-01 at 03 33 20"
src="https://github.com/zed-industries/zed/assets/69181766/e17c184e-203e-40c3-a08f-4de46226b79c">
</details>
Release Notes:
- Added OCaml Support
([#5316](https://github.com/zed-industries/zed/issues/5316)).
> [!NOTE]
> Partially completes #5316
> To complete #5316:
> 1. addition of a reason tree-sitter grammar.
> 2. opam/esy integration, however it may be better as it's own plugin.
Rashid Almheiri
created
980d4f1
Add inline code blocks in markdown preview (#7277)
Click to expand commit body
Fixes #7236.
The reason why the code was not displayed correctly is due to missing
background color for the inline code block.
Previously to this PR:
<img width="1840" alt="SCR-20240202-mclv"
src="https://github.com/zed-industries/zed/assets/67913738/92f63e72-db86-4de9-bb42-40549679e159"
alt="Screenshot showing that inline code blocks are not highlighted in
Markdown preview">
After this PR:
<img width="1796" alt="SCR-20240202-mccs"
src="https://github.com/zed-industries/zed/assets/67913738/5cf039af-82d7-41b8-b461-f79dec5ddf6a"
alt="Screenshot showing that inline code blocks are now highlighted in
Markdown preview">
Release Notes:
- Fixed inline code block not shown in markdown preview
([#7236](https://github.com/zed-industries/zed/issues/7236)).
Robin Pfäffle
created
79c1003
go: fix highlighting of brackets, variables, fields (#7276)
Click to expand commit body
This changes the highlighting of Go code to make it more similar to how
we highlight Rust
* normal variables have the normal color, vs. being highlighted. This
really stuck out.
* brackets are properly highlighted
It also brings it closer to Neovim's tree-sitter highlighting by
changing how struct fields are highlighted.
Release Notes:
- Improved highlighting of Go code by tuning highlighting of variables,
brackets, and struct fields.
## Before & After
