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>
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
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)).
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.
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
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>
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-67695698af5dhttps://github.com/zed-industries/zed/assets/1185253/0b086ec9-eb90-40a2-9009-844a215e6378
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
![screenshot-2024-02-02-11 38
08@2x](https://github.com/zed-industries/zed/assets/1185253/a754f166-89c1-40e8-a8da-b63155180896)
The way Rust generics works, having a generic argument puts the burden of codegen on the crate that instantiates a generic function, which in our case is an editor.
This PR implements support for displaying diagnostics in the scrollbar,
similar to what is already done for search results, symbols, git diff,
...
For example, changing a field name (`text`) without changing the
references looks like this in `buffer.rs` (note the red lines in the
scrollbar):
![image](https://github.com/zed-industries/zed/assets/53836821/c46f0d55-32e3-4334-8ad7-66d1578d5725)
As you can see, the errors, warnings, ... are displayed in the scroll
bar, which helps to identify possible problems with the current file.
Relevant issues: #4866, #6819
Release Notes:
- Added diagnostic indicators to the scrollbar
Fixes#7003 and #7005.
Selecting as a reaction to actually opening a new item doesn’t seem
robust in all cases, the PR improves that.
Release Notes:
- Fixed missing project panel file selection in certain cases
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: Nathan Sobo <nathan@zed.dev>
Previously, we were logging the language server's binary filename
instead.
Release Notes:
- N/A
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
After this change we'll be able to push a tag to github to deploy to
collab.
The advantages of this are that there's no longer a separate step to
first
build the image, and then deploy it.
In the future I'd like to make this happen more automatically (maybe as
part of
bump nightly).
Release Notes:
- N/A
Previously we would run these loops indefinitely when a language server
closed its stdout/stderr and the `read_until` returned `0` bytes read.
Easy to reproduce: start Zed with LSP attached, `kill -9` the LSP, see
logs accumulate.
Release Notes:
- Fix high CPU usage when a language server crashes (or closes its
stdout/stderr on purpose).
Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Based on the great work in
https://github.com/zed-industries/zed/pull/7130 , now sends this data
```
[crates/lsp/src/lsp.rs:588] ClientInfo { name: name.to_string(), version: Some(version.to_string()) } = ClientInfo {
name: "Zed Dev",
version: Some(
"0.122.0",
),
}
```
with every LSP server initialization.
Release Notes:
- Added Zed name and version to LSP InitializeParams requests
This is a follow-up to #7141 and fixes the focus-switching to docks in
case they haven't been focused before.
We ran into issues when trying to focus a dock, that hasn't been focused
in the app's lifecycle: focus would only flip after the next re-render
(which could be triggered by moving the mouse, for example)
This changes the approach and uses the one we have for `toggle focus`
actions.
Release Notes:
- N/A
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: bennetbo <bennetbo@gmx.de>
Just a small improvement as a follow up to @kierangilliam great work on
#6958
Rendering a table specified like this:
```markdown
| Left columns | Center columns | Right columns |
| ------------- |:--------------:| -------------:|
| left foo | center foo | right foo |
| left bar | center bar | right bar |
| left baz | center baz | right baz |
```
Does now look like this (notice the cell alignments):
![image](https://github.com/zed-industries/zed/assets/53836821/0f5b6a1e-a3c2-4fe9-bdcb-8654dbae7980)
Release Notes:
- N/A
Follow-up of https://github.com/zed-industries/zed/pull/6947 (cc
@alygin) that fixes a few style nits and refactors the code around:
* use already stored `currently_opened_path` to decide what to do with
the history item sorting
* use the same method to set history items, encapsulate the bubbling up
logic there
* ensure history elements are properly sorted before populating
The main reason to change all that is the new comparator in the previous
version:
https://github.com/zed-industries/zed/pull/6947/files#diff-eac7c8c99856f77cee39117708cd1467fd5bbc8805da2564f851951638020842R234
that almost violated `util::extend_sorted` contract, requiring both
collections to be sorted the same way as the comparator would be: it did
work, because we bubbled currently open item up in the history items
list manually, and that we have only one such item.
Release Notes:
- N/A
This PR completes the first task of the Tabless editing feature (#6424).
It makes file finder select the previously opened file by default which
allows the user to quickly switch between two last opened files by
clicking `Cmd-P + Enter`.
This feature was also requested in #4663 comments.
Release Notes:
* Improved file finder selection: currently opened item is not selected now
This adds the ability to navigate to/from docks (Terminal, Project,
Collaboration, Assistant) via keybindings.
When using the `ActivatePaneInDirection` keybinding from the
left/bottom/right dock, we check whether the movement is towards the
center panel. If it is, we focus the last active pane.
Fixes https://github.com/zed-industries/zed/issues/6833 and it came up
in a few other tickes/discussions.
Release Notes:
- Added ability to navigate to docks and back to the editor using the
`workspace::ActivatePaneInDirection` action (by default bound to `Ctrl-w
[hjkl]` in Vim mode).
([#6833](https://github.com/zed-industries/zed/issues/6833)).
## Drawback
There's this weird behavior: if you start Zed and no files are opened,
you focus terminal, go left (project panel), then back to right to
terminal, the terminal isn't focused. Even though we focus it in the
code.
Maybe this is a bug in the current focus handling code?
## Demo
https://github.com/zed-industries/zed/assets/1185253/5d56db40-36aa-4758-a3bc-7a0de20ce5d7
---------
Co-authored-by: Piotr <piotr@zed.dev>
This hopefully reduces confusion for new users. I updated the docs just
this morning, but I figured it's probably better to fix the issue
itself.
So what this does is to render the API key editor whenever the assistant
panel is opened/focused and no credentials can be found.
See: https://github.com/zed-industries/zed/discussions/6943
Release Notes:
- Fixed assistant panel not showing dialog to enter API key when opened
without saved credentials.
---------
Co-authored-by: Piotr <piotr@zed.dev>
Adds a "markdown: open preview" action to open a markdown preview.
https://github.com/zed-industries/zed/assets/18583882/6fd7f009-53f7-4f98-84ea-7dd3f0dd11bf
This PR extends the work done in `crates/rich_text` to render markdown
to also support:
- Variable heading sizes
- Markdown tables
- Code blocks
- Block quotes
## Release Notes
- Added `Markdown: Open preview` action to partially close
([#6789](https://github.com/zed-industries/zed/issues/6789)).
## Known issues that will not be included in this PR
- Images.
- Nested block quotes.
- Footnote Reference.
- Headers highlighting.
- Inline code highlighting (this will need to be implemented in
`rich_text`)
- Checkboxes (`- [ ]` and `- [x]`)
- Syntax highlighting in code blocks.
- Markdown table text alignment.
- Inner markdown URL clicks