This PR adds a `/rustdoc` slash command for retrieving and inserting
rustdoc docs into the Assistant.
Right now the command accepts the crate name as an argument and will
return the top-level docs from `docs.rs`.
Release Notes:
- N/A
I realized that somehow, the `git` executable is able to compute `git
status` much more quickly than libgit2, so I've switched our git status
logic to use `git`. Follow-up to
https://github.com/zed-industries/zed/pull/12266.
Release Notes:
- Improved the performance of git status updated when working in large
git repositories.
- Added support for xdg trash when deleting files on linux
- moved ashpd depency to toplevel to use it in both fs and gpui
If I need to add test, or change anything, please let me know. I tested
locally by creating and deleting a file and confirming it showed up in
my trashcan, but that probably a less than ideal method of confirming
correct behavior
Also, I could remove the delete directory function for linux, and change
the one configured for macos to compile for both macos and linux (they
are the same, the version of the function they are calling is
different).
Release Notes:
- N/A
This PR adds a new crate for converting rustdoc output to Markdown.
We're leveraging Servo's `html5ever` to parse the Markdown content, and
then walking the DOM nodes to convert it to a Markdown string.
The Markdown output will be continued to be refined, but it's in a place
where it should be reasonable.
Release Notes:
- N/A
Release Notes:
- Fixed an issue where expanded hunks could be rendered at the wrong
position when zooming
- Fixed an issue where expanded hunks could be rendered at the wrong
position when toggling git blame
([#11941](https://github.com/zed-industries/zed/issues/11941))
Partially fixes#5119
TODO:
- [ ] Change cursor style to Copy when dragging an entry with opt
pressed.
Release Notes:
- Drag-and-dropping a project panel entry with opt modifier pressed now
copies the entry instead of moving it.
This pull request fixes two issues in `RateLimiter` that caused
excessive rate-limiting to take place:
- c19083a35c fixes a mistake that caused
us to load buckets from the database incorrectly and set the
`refill_time_per_token` to equal the `refill_duration`. This was the
primary reason why rate limiting was acting oddly.
- 34b88d14f6 fixes another slight logic
error that caused tokens to be underprovisioned. This was minor compared
to the bug above.
Release Notes:
- N/A
We should reintroduce this as part of the prompt library.
Release Notes:
- Removed an over-eager system prompt from the assistant that was
causing misbehavior. Going forward, our intent is to always let you
observe and edit text before we send it.
---------
Co-authored-by: Marshall <marshall@zed.dev>
This PR changes the default value of the `calls.share_on_join` setting
from `true` to `false`.
Nathan mentioned that project sharing should be opt-in so that projects
aren't shared unless you intend for them to be.
Release Notes:
- Changed the default `calls.share_on_join` value to `false`.
Release Notes:
- Added support for `background_color` in `syntax` map in `theme.json`.
This adds support for setting a `background_color` for styles inside the
`syntax` map for themes defined in `theme.json`. The field is optional
so there should be no backwards compatibility issues.
It is worth noting that the current behaviour for selecting text is that
the background colours will mix/blend (I'm not sure the correct term
here). Changing this behaviour, or making it configurable, looks to be a
far more complex issue and I'm not sure I know how to do it.
* Start with a longer duration
* Widen the range used for randomizing the duration between retries
* Increase the maximum duration between retries
Release Notes:
- N/A
ping #6687
This is the third iteration of this PR ([v2
here](https://github.com/zed-industries/zed/pull/11949)) and uses a
different approach to the first two (the process wrapper lib was a
maintainability nightmare). While the first two attempted to spawn the
necessary processes using flatpak-spawn and host-spawn from the app
inside the sandbox, this version first spawns the cli binary which then
restart's itself *outside* of the sandbox using flatpak-spawn. The
restarted cli process than can call the bundled app binary normally,
with no need for flatpak-spawn because it is already outside of the
sandbox. This is done instead of keeping the cli in the sandbox because
ipc becomes very difficult and broken when trying to do it across the
sandbox.
Gnome software (example using nightly channel and release notes
generated using the script):
<img
src="https://github.com/zed-industries/zed/assets/81528246/6391d217-0f44-4638-9569-88c46e5fc4ba"
width="600"/>
TODO in this PR:
- [x] Bundle libs.
- [x] Cleanup release note converter.
Future work:
- [ ] Auto-update dialog
- [ ] Flatpak auto-update (complete 'Auto-update dialog' first)
- [ ] Experimental
[bundle](https://docs.flatpak.org/en/latest/single-file-bundles.html)
releases for feedback (?).
*(?) = Maybe / Request for feedback*
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
- Confirming a completion now runs the command immediately
- Hitting `enter` on a line with a command now runs it
- The output of commands gets folded away and replaced with a custom
placeholder
- Eliminated ambient context
<img width="1588" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/b1927a45-52d6-4634-acc9-2ee539c1d89a">
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Adds the following features to the prompt manager:
- New prompt – Create a new prompt from the UI. It will only persist if
it is saved.
- Save prompt – Save a prompt by clicking the save button in the UI. A
keybinding will be added for this in the future.
- Reveal prompt - Show the selected prompt on the file system. Only
available for saved prompts.
New prompts that are saved will use the
`{slugified_title}_{ver}_{id}.md` format which all imported prompts will
move to in the near future.
Also orders prompts in alphabetical order by default.
Release Notes:
- N/A
/cc @RemcoSmitsDev new task indicators weren't showing for me in JSON
files.
`tasks.json` of native grammars is not being read by anything by
default, so we tend to register tasks as Rust structs, foregoing the
deserialization step. This doesn't apply to tasks registered in
extensions, which have to have tasks.json.
Release Notes:
- N/A
Release Notes:
- N/A
Fixes#12198 and some minor fixes:
* IBus was intercepting normal keys like `a`, `k` which caused some
problems in vim mode.
* Wayland: Trying to commit the pre_edit on click wasn't working
properly, should be fixed now.
* X11: The pre_edit was supposed to be cleared when losing keyboard
focus.
* X11: We should commit the pre_edit on click.
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
The method has been tested on:
- Gnome 46 (Working)
- Gnome 40 (Not supported)
Tasks
- [x] Implements a draft which get and provides the user theme to
components which needs it
- [x] Implements a way to call the callback function when the theme is
updated
- [X] Cleans the code
Release notes:
- N/A
There were two issues:
1. the `ModifiersChanged` event was never emitted on windows.
macOS, x11 and wayland have separate events for this, while on windows
they are sent via the usual `keyup` and `keydown` events, but
`parse_keydown_msg_keystroke` just ignored them.
2. the word segmenting regex didn't include '\' so paths weren't
correctly detected
fixes https://github.com/zed-industries/zed/issues/12321
Release Notes:
- N/A
Running the tests on windows currently fails for every gpui test using
the `TestPlatform` with
```rs
called `Result::unwrap()` on an `Err` value: CoInitialize has not been called. (0x800401F0)
```
trying to call `CoCreateInstance`in the `DirectWriteComponent`.
The `WindowsPlatform` calls
[`OleInitialize`](https://learn.microsoft.com/de-de/windows/win32/api/ole2/nf-ole2-oleinitialize)
which internally calls `CoInitializeEx` so I just copied that to the
`TestPlatform`.
Release Notes:
- N/A
At the current moment, the "Reveal in Finder" behavior on Windows
"opens" the file using direct execution. This causes files to be opened
with whatever software they are associated with (i.e. will open Sublime
Text instead of the file explorer).
Release Notes:
- Fixed "Reveal in Finder" on Windows to open with the File Explorer.
The new behavior always opens the file explorer with the target
folder/file pre-selected.
https://github.com/zed-industries/zed/assets/28355157/b8ba471d-2f5b-4529-90c3-4dc59f308b99
This (mostly) allows the CSD added in
https://github.com/zed-industries/zed/pull/11525 to work in X11. It's
still a bit buggy as it detects a second window drag right after the
first one finishes, but it's probably better to change the way window
drags are detected in the title bar itself (as that causes other
issues).
The CSD can be tested by changing the return value of
`should_render_window_controls` to true.
Also fixes F11 crashing.
Release Notes:
- N/A
Upper before this PR, lower after.
![Screenshot 2024-05-20
144852](https://github.com/zed-industries/zed/assets/14981363/88995482-3a98-41be-9c2c-6b781bef6ad2)
This PR manually applies a MSAA to the font atlas. Before this PR, the
font may seem aliased ( espeacially on low DPI monitors ), that's
because `DirectWrite` and `CoreText` ( on which currently `Zed` built
the whole text system ) uses different anti-aliasing strategy. The
different anti-aliasing approach used by `DirectWrite` and `CoreText`:
![Screenshot 2024-05-20
151114](https://github.com/zed-industries/zed/assets/14981363/21a2fc1e-48a2-4cff-a9d1-41602eff3658)
The upper is `VSCode` font rendering result, middle `macOS`, lower this
PR ( pic captured with same font face, same font size, same DPI, same
physical resolution, same editor theme, and same magnification rate ).
This PR brings a quality similiar to `CoreText`. What's more, from the
`VSCode` image, you can see how `DirectWrite` sub-pixel anti-aliasing is
performed on the edge of the glyph. Can we achieve the same rendering
quality? Currently, No. `Zed` use a grayscale image to render glyph, and
a sub-pixel anti-aliasing `DirectWrite` requires all RGB channels and
the foreground color of the rendering glyph, which `Zed` dose not
provide.
So, to achieve the quality of `VSCode` font rendering, the text system
of `Zed` needs much much more efforts to refactor the codes.
Release Notes:
- N/A