Since we do want to have different versions of Zed running on the same
Linux install, we need to give them different application IDs so they're
not grouped together as the same application.
This changes the app_id depending on the releaes channel and, crucially,
it also matches them up with the bundle identifiers that we use on
macOS.
Release Notes:
- N/A
Release Notes:
- N/A
While developing [Loungy](https://loungy.app), I noticed that everytime
I wake my laptop, Loungy starts consuming 100% CPU. I traced it down to
`start_display_link` as there was this error message at the time of wake
up:
```
[2024-05-02T05:02:31Z ERROR util] /Users/matthias/zed/crates/gpui/src/platform/mac/window.rs:420: could not create display link, code: -6661
```
The timeline is this:
1. The application is hidden with `cx.hide()`
2. The system is put to sleep and later woken up
3. `window_did_change_screen` would trigger immediately after wakeup,
calling `start_display_link`
4. `start_display_link` fails catastrophically as `DisplayLink::new`
starts hogging all the CPU for some reason?
5. throws the error message above
6. Once the window is opened, `window_did_change_occlusion_state` it
retriggers `start_display_link` and the CPU issue subsides
As an attempt to do things better when showing diff hunks, store diff
base as Rope, not String, to have cheaper clones when the diff base text
is reused, e.g. creating another buffer with the diff base text for hunk
diff expanding.
Release Notes:
- N/A
This chunking strategy uses the existing `outline` query to chunk files.
We try to find chunk boundaries that are:
* at starts or ends of lines
* nested within as few outline items as possible
Release Notes:
- N/A
Co-Authored-By: Mikayla <mikayla@zed.dev>
In a fit of ill-advisedness I called these things remote projects;
forgetting that remote project is also what we call collaboratively
shared projects.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Release Notes:
- Fixed#10888
This patch addresses behavior of
`Editor::move_to_{beginning|end}_of_line`. It adds a setting,
`stop_at_soft_wraps` when defining a keymap for the
`editor::MoveToBeginningOfLine` and `editor::MoveToEndOfLine` actions.
When `true`, it causes movement to the either end of the line (via, for
example Home or End), to go to the logical end, as opposed to the
nearest soft wrap point in the respective direction.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This allows function call (i.e. snippet) completion with
`typescript-language-server`. So far that didn't work, because
`typescript-language-server` doesn't respond with `insertText` when
getting the completions, but only when then sending
`completionItem/resolve` requests. See:
https://github.com/hrsh7th/nvim-cmp/issues/646#issuecomment-992765479
What this PR does is to support text edits in the response to
`completionItem/resolve`, which means updating the completion item.
It then enables this feature by default for
`typescript-language-server`.
TODOs:
- [x] Make this work over collab
- [x] Test that this doesn't break existing language server support
- [x] Refactor duplicated code
Release Notes:
- Added support for function call completion when using
`typescript-language-server`. This will result in parameters being
added, which can then be changed and navigated with `<tab>`. For this to
work with `typescript-language-server`, the documentation for a given
completion item needs to be resolved, meaning that if one types very
quickly and accepts completion before `typescript-language-server` could
respond with the documentation, no full function completion is used.
Demo:
https://github.com/zed-industries/zed/assets/1185253/c23ebe12-5902-4b50-888c-d9b8cd32965d
I was experiencing hang, and we blamed it on spawning a few hundred git
processes
simultaneously.
cc @MrNugget
Release Notes:
- Fixed slowness with hundreds of buffers open doing git blame.
Co-Authored-By: Mikayla <mikayla@zed.dev>
Release Notes:
- Show server name in the titlebar for remote projects
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR cleans up the `Indicator` component:
- Renamed `IndicatorStyle` to `IndicatorKind` and made it private.
- Fixed `Indicator::bar()` to construct an indicator using the right
`IndicatorKind`.
- Removed the `IndicatorIcon`, since we didn't actually end up using it.
Release Notes:
- N/A
One contributor to some beach-balls was that the main thread was calling
block_with_timeout, but the timeout never fired.
Release Notes:
- Reduced main thread hangs under very high system load
This PR replaces the rem size literals with the `BASE_REM_SIZE_IN_PX`
constant.
This way we can retain our source of truth for the rem size that we're
designing against.
Release Notes:
- N/A
This PR updates the new assistant to use the new (temporary) icon in the
status bar to distinguish it.
We added the icon in #11257, but hadn't wired it up.
Release Notes:
- N/A
We are still getting comments from users saying they didn't know we had
extensions until just now. This doesn't fix anything for existing users,
but it helps make new users more aware, earlier on. There's probably
more we need to do for discoverability, but this feels like it should
help.
Release Notes:
- N/A
With this patch applied I can see the following line in the test output:
test tests::random_channel_buffer_tests::test_random_channel_buffers has
been running for over 60 seconds
Without it I run in a failure with 'Invalid keystroke `cmk-,`
Release Notes:
- N/A
---------
Co-authored-by: Max Linke <kain88-de@users.noreply.github.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Part of https://github.com/zed-industries/zed/issues/4523
Added two new actions with the default keybindings
```
"cmd-'": "editor::ToggleHunkDiff",
"cmd-\"": "editor::ExpandAllHunkDiffs",
```
that allow to browse git hunk diffs in Zed:
https://github.com/zed-industries/zed/assets/2690773/9a8a7d10-ed06-4960-b4ee-fe28fc5c4768
The hunks are dynamic and alter on user folds and modifications, or
toggle hidden, if the modifications were not adjacent to the expanded
hunk.
Release Notes:
- Added `editor::ToggleHunkDiff` (`cmd-'`) and
`editor::ExpandAllHunkDiffs` (`cmd-"`) actions to browse git hunk diffs
in Zed
Previously, a failure to embed the search query (due to a rate limit
error) would appear the same as if there were no results.
* Avoid repeatedly embedding the search query for each worktree
* Unify tasks for searching all worktree
Release Notes:
- N/A
This PR fixes scrollbar auto-show feature when there're not visible
cursors. The intial behavior was broken in #11147.
The problem is that `selections` only contains visible selections, so
the `if` with `non_visible_cursors |= true` is only visited in rare edge
cases when we have at least part of the selection still visible on the
screen. But when we scroll far enough from the cursor,
`non_visible_cursors` keeps its default `false` value, which is
incorrect.
Release Notes:
- N/A
Note: You shouldn't use the `unstable.ui_density` setting – it is only
being added for testing and to enable new UI components to be built with
density in mind. Don't expect this to work well, or at all right now.
Adds some of the basic wiring we'll need to start scaling UI elements
throughout the app based on a desired density setting.
Release Notes:
- N/A
Co-Authored-By: Mikayla <mikayla@zed.dev>
My Zed was running out with collab + chat + recent projects + two splits
on a large monitor
Release Notes:
- N/A
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR adds a suggestion for the new [SCSS
extension](https://github.com/bajrangCoder/zed-scss) when `.scss` files
are opened.
Release Notes:
- Added a suggestion for the SCSS extension when `.scss` files are
opened.
For #11084 In the case of an indentation in front of the current line,
it may also be necessary to deal with the start point of the selected
range
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This PR refines the UX of editing a previous message, including the
following:
- Focus the prev message body editor on double-click
- Restore previous body text on cancel
- Cancel pending completion upon submission of previous message
- Drive-by: Remove min height on composer editor
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <marshall@zed.dev>
This PR sets up the `assistant2` crate with the storybook so that UI
elements can be iterated on in isolation.
To start, we have some stories for the `ChatMessage` component:
```sh
cargo run -p storybook -- components/assistant_chat_message
```
<img width="1233" alt="Screenshot 2024-04-30 at 5 20 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/510967ea-0e9b-4fa9-94fb-421ee74bcc45">
Release Notes:
- N/A