This change ensures that we always render a window according to its
refresh rate, even if there are a lot of X11 events.
We're working around some limitations of `calloop`. In the future, we
think we should revisit how the event loop is implemented on X11, so
that we can ensure proper prioritization of input events vs. rendering.
Release Notes:
- N/A
Co-authored-by: Antonio <me@as-cii.com>
Files included with the diagnostics command now include the worktree
name, making it more consistent with the way other commands work
(`/active`, `/tabs`, `/file`). Also, the diagnostics command will now
insert nothing when there are no diagnostics.
Release Notes:
- N/A
This makes us treat yaml like other indentation-sensitive languages
(e.g. Python) and not reformat it on pasting and what not.
Fixes#12236Fixes#13338
Release Notes:
- Fixed spurious appliance of auto-formatting to YAML blocks.
This patch maps `Ctrl+Shift+M` to "Open Markdown Preview to the side".
That's what it used to be in Atom:
https://github.com/atom/markdown-preview
Release Notes:
- Added Markdown Preview shortcut for the Atom keymap
- Docs: Tasks: Explicitly note the location of `tasks.json` files.
- Docs: Keybindings: Add link to task docs showing example of binding to
a specific task.
Release Notes:
- N/A
Runnables can now be disabled with:
```
"gutter": {
"runnables": false
}
```
Fixes#13280
Release Notes:
- Added `gutter.runnables` setting that controls whether runnable
indicators are displayed in the gutter.
This commit fixes the app icon not being correctly associated with the
app window. For example, the app icon is not correctly shown in the dock
(Gnome on Wayland) when Zed is running.
Release Notes:
- N/A
Based on the work on GLES support of @kvark, only two pieces were
missing for usable GLES support:
- https://github.com/kvark/blade/pull/125 was upstreamed 2 weeks ago and
is contained in the currently referenced zed-industries/blade fork
- https://github.com/kvark/blade/pull/126 was upstreamed 17 hours ago
and is not contained in the zed-industries fork. As the zed-industries
fork was also upstreamed in https://github.com/kvark/blade/pull/128, we
can switch back to mainline blade.
If you don't want to switch back to mainline blade, please integrate
https://github.com/kvark/blade/pull/126 to your fork.
Release Notes:
- Fix GLES backend (#9581)
Our dev builds don't have updates and will never have updates, so
instead of polling our servers every time we start a dev instance, let's
disable it for the dev channel.
Release Notes:
- N/A
<img width="1266" alt="Screenshot 2024-06-10 at 14 33 32"
src="https://github.com/zed-industries/zed/assets/1347854/c75de033-f2c8-4500-8b34-46b5f0260d3d">
This changes the recent projects panel to use the order of paths from
the workspace rather than always being alphanumerical.
This follows the work to introduce manual workspace ordering to ensure
the recent projects paths reflect the order of paths in the main project
panel.
Release Notes:
- Improve the recent project panel by ordering paths using the workspace
order
![result](https://github.com/zed-industries/zed/assets/32017007/c400081f-be5d-48fa-994f-90a00e2be359)
In the past, Zed used a single switch called `autoclose` to control both
`autoclose` and `auto_surround` functionalities:
+ `autoclose`: when input '(', append ')' automatically.
+ `auto_surround`: when select text and input '(', surround text with
'(' and ')' automatically.
This PR separates `auto_surround` from `autoclose` to support `<`.
Previously, if `autoclose` of `<` was set to `false`, `auto_surround`
couldn't be used. However, setting `autoclose` to `true` would affect
the default behavior of simple expression. For example, `a < b` would
become `a <> b`.
For more information, see #13187.
Fix#12898.
Release Notes:
- Added support for `auto_surround`
([#12898](https://github.com/zed-industries/zed/issues/12898)).
This adds two new actions to `editor`:
- `editor::SelectPageUp`
- `editor::SelectPageDown`
On Linux they're bound by default to `shift-pageup` and
`shift-pagedown`, which matches VS Code and JetBrains.
Release Notes:
- N/A
This matches the behavior of VS Code and JetBrains.
(Of course I implemented both actions myself before figuring out that we
already have actions to scroll a line up and down.)
Release Notes:
- N/A
This fixes `ctrl-w` and `ctrl-e` not working in the terminal pane but
instead triggering Zed actions ("close pane" and "search project files"
respectively).
I've added both because I think they're pretty commonly used in
terminals, since they're default Emacs-style keybindings.
But I also didn't want to add more, since it's relatively easy for users
to define themselves which keybindings should be forwarded to the
terminal and which not.
All that's required is adding something like this to the keymap:
```json
{
"context": "Terminal",
"bindings": {
"ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
"ctrl-p": ["terminal::SendKeystroke", "ctrl-p"]
}
}
```
cc @mikayla-maki
Release Notes:
- N/A
We saw this panic come up:
```
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: Other, error: UnknownError })
core::panicking::panic_fmt
core::result::unwrap_failed
<gpui::platform::linux::x11:🪟:X11Window as core::ops::drop::Drop>::drop
core::ptr::drop_in_place<gpui::platform::linux::x11:🪟:X11Window>
core::ptr::drop_in_place<gpui:🪟:Window>
gpui::app::AppContext::shutdown
gpui::app::AppContext:🆕:{{closure}}
gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run
gpui::app::App::run
zed::main
std::sys_common::backtrace::__rust_begin_short_backtrace
std::rt::lang_start::{{closure}}
std::rt::lang_start_internal
main
__libc_start_call_main
__libc_start_main_impl
_start
```
I'm not sure where exactly that error comes from, except from the X11
stuff. So let's be defensive and log error and only then tear down
everything.
I _think_ that if the error is repeatable that means we won't close the
window but instead just log errors, but I do think that's better than
panicking right now.
Release Notes:
- N/A
zbus, naga, and some parts of blade are pretty noisy at the INFO level.
zbus especially dumps large debug dumps into the logs.
So on Linux, when logging to a file, we reduce that noise. That means
one still gets the full firehose when doing `RUST_LOG=info cargo run`,
but not in the logs.
Release Notes:
- N/A
Note that right now we can't attach a language server to arbitrary
buffer, which is why I've listed a bunch of languages verbatim.
See
https://github.com/zed-industries/simple-completion-language-server/tree/main
for docs on how to define your snippets. They should be placed in
~/.config/zed/snippets ; `snippets.(toml|json)` file can be used to
define language-agnostic snippets, and any other name (e.g.
`python.toml`) will apply only to buffers of that particular type.
There's https://github.com/rafamadriz/friendly-snippets you can use as a
repository of snippets, for your convenience.
Fixes https://github.com/zed-industries/zed/issues/4611
Release Notes:
- Added support for snippets via simple-completion-language-server
This changes the breadcrumb header from "untitled" to "Last 1000 lines
in <location of log file>".
Reason is that it's been incredibly frustrating not seeing the location
of the log file there and not seeing that it's actually a truncated
version of the logs.
This is one remedy for that.
Other options considered:
1. Opening the actual log file. Turns out that is huge. On Linux right
now it's 5 megabyte after 5 minutes.
2. Opening the file and adding it on the buffer. That is tricky and
weird, because you have to modify the underlying buffer and set the
file, after having to add it to the workspace and getting its entry,
etc.
3. Setting a `display_file_path` on Buffer. That would require also
adding it on `BufferSnapshot` and then threading that through so that it
gets returned by the multi-buffer and then in the editor. And ultimately
this here is a "view concern", so we thought we just add it as such.
So yes, not the best change possible, but it's not that invasive and
makes it clear that it's a view-only concern.
Release Notes:
- N/A
Co-authored-by: Kirill <kirill@zed.dev>