6a915e3
windows: Fix panicking on startup (#11028)
Click to expand commit body
### Connection: Closes #10954 Release Notes: - N/A
张小白 created
6a915e3
windows: Fix panicking on startup (#11028)
### Connection: Closes #10954 Release Notes: - N/A
张小白 created
70d03e4
x11: Fix window close (#11008)
Fixes https://github.com/zed-industries/zed/issues/10483 on X11 Also calls the `should_close` callback before closing the window (needed for the "Do you want to save?" dialog). Release Notes: - N/A
apricotbucket28 created
b1eb029
Re-add README.md which might have been deleted by mistake (#11067)
Release Notes: - N/A
DissolveDZ created
e0644de
Fix panic in Diagnostics (#11066)
cc @maxbrunsfeld Release Notes: - Fixed a panic in populating diagnostics
Conrad Irwin created
9329ef1
markdown preview: Break up list items into individual blocks (#10852)
Fixes a panic related to rendering checkboxes, see #10824. Currently we are rendering a list into a single block, meaning the whole block has to be rendered when it is visible on screen. This would lead to performance problems when a single list block contained a lot of items (especially if it contained checkboxes). This PR splits up list items into separate blocks, meaning only the actual visible list items on screen get rendered, instead of the whole list. A nice side effect of the refactoring is, that you can actually click on individual list items now: https://github.com/zed-industries/zed/assets/53836821/5ef4200c-bd85-4e96-a8bf-e0c8b452f762 Release Notes: - Improved rendering performance of list elements inside the markdown preview --------- Co-authored-by: Remco <djsmits12@gmail.com>
Bennet Bo Fenner and Remco created
664f779
new path picker (#11015)
Still TODO: * Disable the new save-as for local projects * Wire up sending the new path to the remote server Release Notes: - Added the ability to "Save-as" in remote projects --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Bennet <bennetbo@gmx.de>
Conrad Irwin , Nathan , and Bennet created
314b723
remote projects: Allow reusing window (#11058)
Release Notes: - Allow reusing the window when opening a remote project from the recent projects picker - Fixed an issue, which would not let you rejoin a remote project after disconnecting from it for the first time --------- Co-authored-by: Conrad <conrad@zed.dev> Co-authored-by: Remco <djsmits12@gmail.com>
Bennet Bo Fenner , Conrad , and Remco created
1af1a9e
Toggle tasks modal in task::Rerun, when no tasks have been scheduled (#11059)
Currently, when no tasks have been scheduled, the `task::Rerun` action does nothing. This PR adds a fallback, so when no tasks have been scheduled so far the `task::Rerun` action toggles the tasks modal https://github.com/zed-industries/zed/assets/471335/72f7a71e-cfa8-49db-a295-fb05b2e7c905 Release Notes: - Improved the `task::Rerun` action to toggle the tasks modal when no tasks have been scheduled so far
Tim Masliuchenko created
8006f69
Fix `Cargo.toml` typo ref -> rev (#11047)
Release Notes: - N/A
Jakob Hellermann created
bacc923
tasks: Fix divider position in modal (#11049)
The divider between templates and recent runs is constant, regardless of the currently used filter string; this can lead to situations where an user can remove the predefined task, which isn't good at all. Additionally, in this PR I've made it so that recent runs always show up before task templates in filtered list. Release Notes: - Fixed position of list divider in task modal.
Piotr Osiewicz created
eb7bd0b
Use fewer fancy cursors even for vim users (#11041)
Release Notes: - N/A
Conrad Irwin created
7f229dc
Remove unread notes indicator for now (#11035)
I'd like to add something back here, but it's more distracting than helpful today. Fixes: #10887 Release Notes: - Removed channel notes unread indicator --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Conrad Irwin and Marshall Bowers created
03d0b68
Fix panic in rename selections (#11033)
cc @someonetoignore Release Notes: - Fixed a panic when renaming with a selection (preview only)
Conrad Irwin created
5c2f27a
Fix VIM cw on last character of a word doesn't work as expected: (#10963)
At the moment, using the default expand_selection seems to do the job well, without the need for some additional logic, which may also make the code a little clearer, Fix #10945 Release Notes: - N/A
Hans created
d9d509a
Send installation id with crashes (#11032)
This will let us prioritize crashes that affect many users. Release Notes: - N/A
Conrad Irwin created
a4ad3bc
Hoist `nanoid` to workspace-level (#11029)
This PR hoists `nanoid` up to a workspace dependency. Release Notes: - N/A
Marshall Bowers created
6d7332e
Fix panic in vim search (#11022)
Release Notes: - vim: Fixed a panic when searching
Conrad Irwin created
1b614ef
Add an Assistant example that can interact with the filesystem (#11027)
This PR adds a new Assistant example that is able to interact with the filesystem using a tool. Release Notes: - N/A
Marshall Bowers created
604857e
vim: Increment search right (#10866)
Hi there, nice editor! Here's my attempt at fixing #10865. Thanks Release Notes: -vim: Fix ctrl+a when cursor is on a decimal point ([#10865](https://github.com/zed-industries/zed/issues/10865)). --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Hendrik Sollich and Conrad Irwin created
d9eb3c4
vim: Fix hollow cursor being offset when selecting text (#11000)
Fixed the cursor selection being offset, the hollow cursor was being displayed fine when not having text selected that's why it might not have been noticed at first. Release Notes: - N/A Improved: https://github.com/zed-industries/zed/commit/0d6fb08b67e26f5e6abd14ff51b3a9ba1d89b9c0
DissolveDZ created
f8beda0
Rename `chat_with_functions` to use snake_case (#11020)
This PR renames the `chat-with-functions.rs` example to use snake_case for the filename, as is convention. Release Notes: - N/A
Marshall Bowers created
40fe527
Rework project diagnostics to prevent showing inconsistent state (#10922)
For a long time, we've had problems where diagnostics can end up showing
up inconsistently in different views. This PR is my attempt to prevent
that, and to simplify the system in the process. There are some UX
changes.
Diagnostic behaviors that have *not* changed:
* In-buffer diagnostics update immediately when LSPs send diagnostics
updates.
* The diagnostic counts in the status bar indicator also update
immediately.
Diagnostic behaviors that this PR changes:
* [x] The tab title for the project diagnostics view now simply shows
the same counts as the status bar indicator - the project's current
totals. Previously, this tab title showed something slightly different -
the numbers of diagnostics *currently shown* in the diagnostics view's
excerpts. But it was pretty confusing that you could sometimes see two
different diagnostic counts.
* [x] The project diagnostics view **never** updates its excerpts while
the user might be in the middle of typing it that view, unless the user
expressed an intent for the excerpts to update (by e.g. saving the
buffer). This was the behavior we originally implemented, but has
changed a few times since then, in attempts to fix other issues. I've
restored that invariant.
Times when the excerpts will update:
* diagnostics are updated while the diagnostics view is not focused
* the user changes focus away from the diagnostics view
* the language server sends a `work done progress end` message for its
disk-based diagnostics token (i.e. cargo check finishes)
* the user saves a buffer associated with a language server, and then a
debounce timer expires
* [x] The project diagnostics view indicates when its diagnostics are
stale. States:
* when diagnostics have been updated while the diagnostics view was
focused:
* the indicator shows a 'refresh' icon
* clicking the indicator updates the excerpts
* when diagnostics have been updated, but a file has been saved, so that
the diagnostics will soon update, the indicator is disabled
With these UX changes, the only 'complex' part of the our diagnostics
presentation is the Project Diagnostics view's excerpt management,
because it needs to implement the deferred updates in order to avoid
disrupting the user while they may be typing. I want to take some steps
to reduce the potential for bugs in this view.
* [x] Reduce the amount of state that the view uses, and simplify its
implementation
* [x] Add a randomized test that checks the invariant that a mutated
diagnostics view matches a freshly computed diagnostics view
## Release Notes
- Reworked the project diagnostics view:
- Fixed an issue where the project diagnostics view could update its
excerpts while you were typing in it.
- Fixed bugs where the project diagnostics view could show the wrong
excerpts.
- Changed the diagnostics view to always update its excerpts eagerly
when not focused.
- Added an indicator to the project diagnostics view's toolbar, showing
when diagnostics have been changed.
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Max Brunsfeld and Richard Feldman created
cf2272a
Always submit function definitions in Simple mode too (#11016)
Switches Assistant2 to always provide functions. It's up to the model to choose to use them. At a later point, the `Submit::Codebase` should change the `tool_choice` to `query_codebase` rather than `auto`. For now, I think this will improve the experience for folks testing. Release Notes: - N/A
Kyle Kelley created
366d7e7
Break typography styles out of `StyledExt` (#11013)
- Centralizes typography-related UI styles and methods in `styles/typography.rs` - Breaks the typography-related styles out of `StyledExt`. This means we add a `StyledTypography` trait – this should more or less be an invisible change as we publish it in the prelude. - adds the ability to easily grab the UI or Buffer font sizes (`ui_font_size`, `buffer_font_size`) with `TextSize::UI`, `TextSize::Editor` Release Notes: - N/A
Nate Butler created
4c78056
storybook: Fix Backspace in Auto Height Editor and Picker stories (#11011)
Currently in the *Auto Height Editor* story the backspace key is not working when you type into the Editor. The same thing is true for the *Picker* story as one is not able to backspace... By adding an entry in the keymap file ```rust assets/keymaps/storybook.json ``` both of these issues are solved... Release Notes: - N/A
Michael Angerman created
7af96a1
Fix typo in comment
Marshall Bowers created
3eac581
Allow controlling Tailwind via the `language_servers` setting (#11012)
This PR adds the ability for the Tailwind language server
(`tailwindcss-language-server`) to be controlled by the
`language_servers` setting.
Now in your settings you can indicate that the Tailwind language server
should be used for a given language, even if that language does not have
the Tailwind language server registered for it already:
```json
{
"languages": {
"My Language": {
"language_servers": ["tailwindcss-language-server", "..."]
}
}
}
```
Release Notes:
- N/A
Marshall Bowers created
c833a7e
Don't use fancy cursors for non-vim people (#11010)
Release Notes: - N/A
Conrad Irwin created
f176e8f
Accept `View`s on `LanguageModelTool`s (#10956)
Creates a `ToolView` trait to allow interactivity. This brings expanding and collapsing to the excerpts from project index searches. Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Kyle Kelley , Nathan , and Max Brunsfeld created
7005f0b
Remove outdated instructions for adding languages (#11005)
This PR removes the outdated comment regarding adding languages to Zed. New languages should be added as extensions. Release Notes: - N/A
Marshall Bowers created
d3f6ca7
Add @operator, @lifetime and @punctuation.delimiters captures for Rust (#10885)
Adds additional captures for theming rust code. I'm uncertain about whether `#` belongs in the `@operator` capture, but I didn't see a more appropriate capture name in my brief hunt in other files. It is the prefix of an `attribute_item`.. suggestions welcome. Release Notes: - Added `@operator`, `@lifetime` and `@punctuation.delimiter` captures to Rust highlights file.
James Thurley created
544bd49
Extract Elixir extension (#10948)
This PR extracts Elixir support into an extension and removes the
built-in Elixir support from Zed.
As part of this, [Lexical](https://github.com/lexical-lsp/lexical) has
been added as an available language server for Elixir.
Since the Elixir extension provides three different language servers,
you'll need to use the `language_servers` setting to select the one you
want to use:
#### Elixir LS
```json
{
"languages": {
"Elixir": {
"language_servers": [ "elixir-ls", "!next-ls", "!lexical", "..."]
}
}
}
```
#### Next LS
```json
{
"languages": {
"Elixir": {
"language_servers": [ "next-ls", "!elixir-ls", "!lexical", "..."]
}
}
}
```
#### Lexical
```json
{
"languages": {
"Elixir": {
"language_servers": [ "lexical", "!elixir-ls", "!next-ls", "..."]
}
}
}
```
These can either go in your user settings or your project settings.
Release Notes:
- Removed built-in support for Elixir, in favor of making it available
as an extension.
Marshall Bowers created
7065da2
Fix project-panel double click file support on Windows (#10917)
Release Notes: - Fixed project panel double click to force open file on Windows. Ref issue: #10898 @bennetbo I saw you was also used `event.down.click_count` in Markdown Preview. https://github.com/zed-industries/zed/commit/7dccbd8e3b61c48ae174807a4023332b7c1df06a#diff-c8d1735cb347ea08d03198df112343ec50a74de8d50414a6f3be6c6d674c6d19R161 And this also used in other place: <img width="870" alt="image" src="https://github.com/zed-industries/zed/assets/5518/b844e700-b95f-4cd2-987f-9e4305ebdd7c"> ## Test demo after updated Looks like it is no side effect 
Jason Lee created
0d6fb08
vim: set cursor to hollow-block if editor loses focus (#10995)
This has been bugging me for a while now. Finally figured out how to do it. Release Notes: - Fixed cursor in Vim mode not changing into a hollow block when editor loses focus. Demo: https://github.com/zed-industries/zed/assets/1185253/c7585282-156d-4ab2-b516-eb1940d6d0d3
Thorsten Ball created
3ce4ff9
Update `Cargo.lock`
Marshall Bowers created
21022f1
Fix cmd+click find all references fallback not working in Vim mode (#10684)
Exclude go-to-definition links returned by LSP that points to the current cursor position. This fixes #10392 . Related PR #9243 . The previous implementation first performs go-to-definition, and if the selected text covers the clicked position, it figures out that it is already clicking on a definition, and should instead look for references. However, the selected range does not necessarily cover the clicked position after clicking on a definition, as in VIM mode. After the PR, if cmd+click on definitions, the definition links would be an empty list, so no go-to-definition is performed, and find-all-references is performed instead. Release Notes: - Fixed #10392 , now `cmd+click`ing to find all references works in vim mode.
Congyu created
11bcfea
Fix single-line editors not working anymore (#10994)
This was introduced with #10979 and was caused by a missing call to `cx.set_view_id` in `EditorElement`, which is necessary when rendering `EditorElement` manually instead of via a view. Release Notes: - N/A
Antonio Scandurra created
1cd34fd
Recognize `PKGBUILD` as bash script (#10946)
[PKGBUILD] is a file used in the build system of arch linux, and it is basically just a bash script with special functions. Release Notes: - Changed `PKGBUILD` files to be recognized as bash.
Jakob Hellermann created
5302245
Allow pressing `escape` to cancel the current assistant generation (#10987)
If the assistant has already emitted some text, we will leave the assistant message but maintain the cursor on the previous user message, so that the user can easily discard the message by submitting again. If no output was emitted yet, we simply delete the empty assistant message. Release Notes: - N/A
Antonio Scandurra created
0de2636
Revert "Changed cmd+w with no open tabs to close window (#10740)" (#10986)
This PR reverts #10740, as it makes it too easy to close Zed accidentally. Quitting Zed when you don't mean to is disruptive and can break your flow. This is even more the case when you're collaborating. Therefore, we shouldn't make it easy to quit Zed when you don't mean to. If we want to bring back this behavior it needs to have a corresponding setting that should, in my opinion, be **off** by default. Additionally, someone made the good point that this behavior should not be present on Linux or Windows. This reverts commit 5102e37a5bc344cb1f5f2a4116b55d4d3afafbb0. Release Notes: - Changed `cmd-w` with no open tabs to no longer close the window (preview-only).
Marshall Bowers created
7ec9636
git blame: Do not try to blame buffer if it has no file (#10985)
Release Notes: - Fixed error messages being logged due to inline git blame not working on an empty buffer that hasn't been saved yet.
Thorsten Ball created
019821d
eslint: register as language server for Vue.js (#10983)
This fixes #9934 and does two things: 1. It registers ESLint as a secondary language server for Vue.js files (`.vue`) 2. It registers ESLint as a _secondary_ (instead of primary) language server for TypeScript, JavaScript and TSX. The second point because I don't see any reason why ESLint should be registered as a primary language server for these languages. I read through the code in `project.rs` that uses the primary language server and I don't think there will be any differences to how it previously worked. I also manually tested ESLint support in a Vue.js project, a Next.js project and a plain old JS project — still works in all three. Release Notes: - Added ESLint support for Vue.js files by starting it as a language server on `.vue` files. ([#9934](https://github.com/zed-industries/zed/issues/9934)).
Thorsten Ball created
bb213b6
Fix keybinding errors on Linux (#10982)
These showed up as error messages. One of them has been removed and the other two have changed names. Release Notes: - N/A
Thorsten Ball created
6a7761e
Merge `ElementContext` into `WindowContext` (#10979)
The new `ElementContext` was originally introduced to ensure the element APIs could only be used inside of elements. Unfortunately, there were many places where some of those APIs needed to be used, so `WindowContext::with_element_context` was introduced, which defeated the original safety purposes of having a specific context for elements. This pull request merges `ElementContext` into `WindowContext` and adds (debug) runtime checks to APIs that can only be used during certain phases of element drawing. Release Notes: - N/A --------- Co-authored-by: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
031580f
git: Fix inline blame moving on horizontal scroll (#10974)
This fixes the behaviour reported by @mikayla-maki. ## Before https://github.com/zed-industries/zed/assets/1185253/35aa4e6d-295b-4050-b5cc-cab0f91b27e1 ## After https://github.com/zed-industries/zed/assets/1185253/a17cbc9c-fc2c-43d6-918b-1205b327507b ## Release notes Release Notes: - Fixed inline git blame information moving when horizontally scrolling.
Thorsten Ball created
1a27016
Improve logic for obtaining surrounds range in Vim mode (#10938)
now correctly retrieves range in cases where escape characters are present. Fixed #10827 Release Notes: - vim: Fix logic for finding surrounding quotes to ignore escaped characters (#10827)
Hans created
d142560
Fix misalignment of vim mode indicator (#10962)
Credit-to: @elkowar New is the top <img width="220" alt="Screenshot 2024-04-24 at 19 00 48" src="https://github.com/zed-industries/zed/assets/94272/9d917bf1-e175-494d-9653-757d15584921"> Release Notes: - N/A
Conrad Irwin created
583a662
Fix issues with drafting release notes in CI (#10955)
This PR addresses some issues I ran into with the way we draft release notes in CI when doing builds. The first issue I encountered was that `script/draft-release-notes` was failing, seemingly due to CI doing a shallow Git checkout and not having all of the tags available in order to compare then. This was addressed by setting the `fetch-depth` during the Git checkout. The second issue is that (in my opinion) we shouldn't fail the build if drafting release notes fails. After well, we're doing it as a convenience to ourselves, and it isn't a mandatory part of the build. This was addressed by making any failures in `script/draft-release-notes` not fail the CI step as a whole. These changes were already applied to the `v0.133.x` branch. Release Notes: - N/A
Marshall Bowers created
64617a0
Read settings in headless mode (#10950)
Release Notes: - N/A
Conrad Irwin created
b673494
Restore the previous styles for single-line editors (#10951)
This PR fixes a bug introduced in #10870 that caused editors used as single-line inputs to have the wrong text style. If this change was intentional for something relating to the new Assistant panel, we'll need to figure out a way to change it without breaking these other usages. ### Before <img width="589" alt="Screenshot 2024-04-24 at 5 35 36 PM" src="https://github.com/zed-industries/zed/assets/1486634/31624cfd-75d1-4771-9402-c14ef9e9483e"> <img width="326" alt="Screenshot 2024-04-24 at 5 35 46 PM" src="https://github.com/zed-industries/zed/assets/1486634/1b76a3ef-7205-49ee-b391-7609f90461bd"> ### After <img width="588" alt="Screenshot 2024-04-24 at 5 36 14 PM" src="https://github.com/zed-industries/zed/assets/1486634/9d550ee2-80c0-4afb-9b45-a2956471c546"> <img width="260" alt="Screenshot 2024-04-24 at 5 36 31 PM" src="https://github.com/zed-industries/zed/assets/1486634/63240f27-1679-45d5-b39c-016860ff9683"> Release Notes: - Fixed a bug where some inputs were using the wrong font style (preview-only).
Marshall Bowers created