f8bd6c6
Fix cursor shape flickering and dead-zone on 1px border around list items in project and outline panels (#20202)
Click to expand commit body
Move click listener to outer div
- Avoids dead area when clicking the 1px border around a list item
- Avoids flickering cursor shape when moving the cursor above the list,
and especially when scrolling the list with a stationary cursor.
Closes #15614
Release Notes:
- Fixed mouse cursor shape flickering in project and outline panels when
crossing items
([#15614](https://github.com/zed-industries/zed/issues/15614))
---------
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Stephan Aßmus
and
Stephan Aßmus
created
02b1e3a
assistant: Adjust the toolbar design (#20101)
Click to expand commit body
This PR's most relevant change is removing the three-dot menu dropdown
from the assistant toolbar. The "Regenerate Title" button is now only
visible on hover and it appears on the far right of the title input.
<img width="700" alt="Screenshot 2024-11-04 at 13 31 37"
src="https://github.com/user-attachments/assets/891703af-7985-4b16-bb5e-d852491abd6f">
Release Notes:
- N/A
Related comment on issue
https://github.com/zed-industries/zed/issues/14222#issuecomment-2418375056
On `crates/gpui/src/platform/linux/text_system.rs` on method
`CosmicTextSystem::new` `load_system_fonts` is being called twice:
```rust
pub(crate) fn new() -> Self {
let mut font_system = FontSystem::new();
// todo(linux) make font loading non-blocking
font_system.db_mut().load_system_fonts();
Self(RwLock::new(CosmicTextSystemState {
font_system,
swash_cache: SwashCache::new(),
scratch: ShapeBuffer::default(),
loaded_fonts_store: Vec::new(),
font_ids_by_family_cache: HashMap::default(),
postscript_names: HashMap::default(),
}))
}
```
First one on `FontSystem::new()` and second one is explicit on
`font_system.db_mut().load_system_fonts()`. The first call
`FontSystem::new()` is defined as:
```
pub fn new() -> Self {
Self::new_with_fonts(core::iter::empty())
}
```
And `new_with_fonts`:
```rust
/// Create a new [`FontSystem`] with a pre-specified set of fonts.
pub fn new_with_fonts(fonts: impl IntoIterator<Item = fontdb::Source>) -> Self {
let locale = Self::get_locale();
log::debug!("Locale: {}", locale);
let mut db = fontdb::Database::new();
//TODO: configurable default fonts
db.set_monospace_family("Fira Mono");
db.set_sans_serif_family("Fira Sans");
db.set_serif_family("DejaVu Serif");
Self::load_fonts(&mut db, fonts.into_iter());
Self::new_with_locale_and_db(locale, db)
}
```
Finally `Self::load_fonts(&mut db, fonts.into_iter())` calls
`load_system_fonts`:
```rust
#[cfg(feature = "std")]
fn load_fonts(db: &mut fontdb::Database, fonts: impl Iterator<Item = fontdb::Source>) {
#[cfg(not(target_arch = "wasm32"))]
let now = std::time::Instant::now();
db.load_system_fonts();
for source in fonts {
db.load_font_source(source);
}
...
```
Release Notes:
- Remove duplicate font loading on Linux
Alvaro Parker
created
17b9d19
Fix buffer restoration on ssh projects (#20215)
Click to expand commit body
Closes #20143
Release Notes:
- Remoting: Fixed a panic restoring unsaved untitled buffers over SSH
Follow-up of https://github.com/zed-industries/zed/pull/20171
Reduces time Zed needs to reach maximum search results by an order of a
magnitude.
Methodology:
* plugged-in mac with Instruments and Zed open
* Zed is restarted before each measurement, `zed` project is opened, a
*.rs file is opened and rust-analyzer is fully loaded, file is closed
then
* from an "empty" state, a `test` word is searched in the project search
* each version is checked with project panel; and then, separately,
without it
* after we reach maximum test results (the counter stops at `10191+`),
the measurement stops
Zed Dev is compiled and installed with `./script/bundle-mac -li`
------------------------
[measurements.trace.zip](https://github.com/user-attachments/files/17625516/measurements.trace.zip)
Before:
* Zed Nightly with outline panel open
<img width="1113" alt="image"
src="https://github.com/user-attachments/assets/62b29a69-c266-4d46-8c3c-0e9534ca7967">
Took over 30s to load the result set
* Zed Nightly without outline panel
<img width="1109" alt="image"
src="https://github.com/user-attachments/assets/82d8d9d6-e8f2-4e67-af55-3f54a7c1d92d">
Took over 24s to load the result set
* Zed Dev with outline panel open
<img width="1131" alt="image"
src="https://github.com/user-attachments/assets/15605ff8-0787-428e-bbb6-f8496f7e1d43">
Took around 6s to load the result set (the profile was running a bit
longer)
* Zed Dev without outline panel
<img width="1147" alt="image"
src="https://github.com/user-attachments/assets/0715d73e-f41a-4d74-a604-a3a96ad8d585">
Took around 5s to load the result set
---------------------
Improvements in the outline panel:
* https://github.com/zed-industries/zed/pull/20171 ensured we reuse
previous rendered search results from the outline panel
* all search results are now rendered in the background thread
* only the entries that are rendered with gpui are sent to the
background thread for rendering
* FS entries' update logic does nothing before the debounce now
Improvements in the editor:
* cursor update operations are debounced and all calculations start
after the debounce only
* linked edits are now debounced and all work is done after the debounce
only
Further possible improvements:
* we could batch calculations of text coordinates, related to the search
entries: right now, each search match range is expanded around and
clipped, then fitted to the closest surrounding whitespace (if any,
otherwise it's just trimmed).
Each such calculation requires multiple tree traversals, which is
suboptimal and causes more CPU usage than we could use.
* linked edits are always calculated, even if the language settings have
it disabled, or the corresponding language having no corresponding
capabilities
Release Notes:
- Improve large project search performance
2965119
project panel: scroll when drag-hovering over the edge of a list (#20207)
Click to expand commit body
Closes [19554](https://github.com/zed-industries/zed/issues/19554)
Release Notes:
- Added auto-scrolling to project panel when a vertical edge of a panel
is hovered with a dragged entry.
Piotr Osiewicz
created
258cf6c
Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206)
Click to expand commit body
Closes #9195
Closes #19787
Release Notes:
- Fixed an issue where single quotation marks were spuriously
auto-closed when typing in line comments
Max Brunsfeld
created
369de40
Make rewrapping take tabs more into account (#20196)
Click to expand commit body
Closes #18686
https://github.com/user-attachments/assets/e87b4508-3570-4395-92b4-c5e0e9e19623
Release Notes:
- The Rewrap command now considers the width of each tab character at
the beginning of the line to be the configured tab size.
---------
Co-authored-by: Will <will@zed.dev>
Richard Feldman
and
Will
created
dc02894
editor: Add scrollbar to info popovers (#20184)
Click to expand commit body
Related to https://github.com/zed-industries/zed/issues/5034
Release Notes:
- Added scrollbar to info popovers in editor.
Piotr Osiewicz
created
966b18e
assistant: Fix Gemini 1.5 Pro throwing "missing field 'index' at line N column M" (#20200)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/20033
- Fixed deserialization error of `GenerateContentCandidate` where `index` is unexpectedly nil
Patrick Sy
created
2c7e710
Fix selection extend/shrink on JetBrains keymap (#20199)
Click to expand commit body
JetBrains IDE's use `ctrl-w` and `ctrl-shift-w` on Win/Linux and
`cmd-up` and `cmd-down` on mac to extend/shrink selections.
https://www.jetbrains.com/guide/java/tips/extend-selection/
Release Notes:
- Fixed extend/shrink selection on JetBrains keymap
Elias Müller
created
24dba07
Do not alter soft wrap based on .editorconfig contents (#20198)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/20194
Release Notes:
- Fixed Zed incorrectly changing soft wrap based on .editorconfig
contents ([#20194](https://github.com/zed-industries/zed/issues/20194))
Kirill Bulatov
created
16e9b4c
typescript: Improve installation checks for `vtsls` (#20197)
Click to expand commit body
This PR improves the installation checks for `vtsls`.
Previously we were checking the installed version of TypeScript against
the latest available version to determine whether we needed to installed
the `vtsls` language server or not.
However, these are two independent concerns, so we should be checking
individually whether `typescript` or `@vtsls/language-server` need to be
installed/updated.
Closes https://github.com/zed-industries/zed/issues/18349.
Release Notes:
- typescript: Fixed an issue where `@vtsls/language-server` may not have
been updated to the latest version.
Marshall Bowers
created
bc4bd2e
Don't conservatively include Suggest Edits token in token count (#20180)
Click to expand commit body
Before: (note the 1.3k in the upper right corner instead of 3 in the
second screenshot)
<img width="459" alt="Screenshot 2024-11-04 at 11 37 58 AM"
src="https://github.com/user-attachments/assets/64c06aff-f7d2-42a4-a767-0d7a4ba0f486">
Now:
<img width="631" alt="Screenshot 2024-11-04 at 11 38 11 AM"
src="https://github.com/user-attachments/assets/22af974d-915a-41e1-9ee0-f0622901e242">
This was intended to be a conservative estimate in case you pressed
Suggest Edits (and therefore might have an unpleasant surprise if you
were under the context limit but Suggest Edits failed with a "too much
context" error message anyway, after the Suggest Edits context got added
for you behind the scenes).
However, in retrospect this design created more [confusion in the common
case](https://github.com/zed-industries/zed/pull/19900#issuecomment-2453456569)
because it made it look like more context had been actually consumed
than what was actually consumed.
This does raise a potential design question for the future: the Suggest
Edits button adds more context at the last minute without ever
communicating that it's going to do that.
In the meantime it seems best to go back to the less-confusing way of
reporting the token counts, especially since only users of the
experimental flag could possibly press Suggest Edits anyway.
Release Notes:
- Fixed issue where initial token count was over-reported as 1.3k
instead of 3 (for the context string "You").
Richard Feldman
created
4d3a18c
Fix two auto-indent issues with Markdown and YAML (#20193)
Click to expand commit body
Closes #13376
Closes #13338
Release Notes:
- Fixed unhelpful auto-indent suggestions in markdown.
- Added `auto_indent_on_paste` setting, which can be used on a
per-language basis, to configure whether indentation should be adjusted
when pasting. This setting is enabled by default for languages other
than YAML and Markdown.
Max Brunsfeld
created
cfcbfc1
Fix saving files as `*.sql` on macOS Sequoia (#20195)
Click to expand commit body
Closes #16969
Release Notes:
- Fixed a bug in macOS Sequoia where you can't save a new file as
`*.sql`, it would rename to `.sql.s`. As a side effect you can no longer
save a new file as `*sql.s`. We hope to remove this workaround when the
operating system fixes its bug; in the meantime you can either set
`"use_system_path_prompts": false` in your settings file to skip the
macOS dialogues, or create new files by right clicking in the project
panel.
Conrad Irwin
created
c9ec235
Sort completions by relevance for strong matches (#20145)
Click to expand commit body
Further enhancement:
On exploring VSCode's sorting logic, there are two major distinctions:
* A config option exists to adjust sort priority of snippets. They can
be placed inline (default), top or at bottom of completitions.
* The sorting order sorts by (in order): sort_text (lower case),
sort_text, kind
ref:
https://github.com/microsoft/vscode/blob/6f2d4781e857a550b7e9b05d40b969c840e264db/src/vs/editor/contrib/suggest/browser/suggest.ts#L338-L383
Closes #19786
Release Notes:
- Improved sort order in completions to show relevant matches first
([#19786](https://github.com/zed-industries/zed/issues/19786))
Avinash Thakur
created
8196db6
settings: Include `null` in the type for optional settings (#20192)
Click to expand commit body
This PR updates all settings that are defined as `Option`s to include
`null` in their type.
This prevents warnings from being displayed when `null` is used a
default value.
Closes https://github.com/zed-industries/zed/issues/18006.
Release Notes:
- Updated the settings schema to allow `null` as a value for optional
settings instead of showing a warning.
Marshall Bowers
created
dc5fad5
diagnostics: Improve performance with large # of diagnostics (#20189)
Click to expand commit body
Related to: https://github.com/zed-industries/zed/issues/19022
Release Notes:
- Improve editor performance with large # of diagnostics.
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Piotr Osiewicz
,
Conrad
, and
Conrad Irwin
created
77de20c
settings: Allow `null` as a value for font fallback fields (#20186)
Click to expand commit body
This PR updates the `buffer_font_fallbacks` and `ui_font_fallbacks`
settings to allow `null` as a value instead of showing a warning.
Related to https://github.com/zed-industries/zed/issues/18006.
Release Notes:
- Updated the settings schema to allow `null` as a value for
`buffer_font_fallbacks` and `ui_font_fallbacks` instead of showing a
warning.
Added some simple logic + an example of adding pages to the theme
preview. Will be used for organizing theme preview sections.
Release Notes:
- N/A
Nate Butler
created
7025d3f
Extract outline rendering to `outline` crate (#20179)
Click to expand commit body
This PR extracts the `render_item` implementation for outlines to the
`outline` crate to help reduce `language`'s dependence on `theme`.
Release Notes:
- N/A
Marshall Bowers
created
4bbde40
recent projects: Fix inconsistent keybinding with which window is replaced or not (#20176)
Click to expand commit body
This removes the inconsistency between these two workflows:
- Clicking on the project name in the upper left shows:
<img width="333" alt="image"
src="https://github.com/user-attachments/assets/f54c34b4-67ab-4cbc-85ee-845c41aa4a8c">
- Using `projects: Open recent` shows:
<img width="337" alt="image"
src="https://github.com/user-attachments/assets/b1eb244f-ce28-4e6c-8404-b6cd88caef1e">
---
We now use `enter` to re-use the window and `cmd-enter` to open a new
window in both cases
Closes #16361
Release Notes:
- Fixed an inconsistency in the recent project picker, where different
keybindings would determine whether to reuse the window or not
Bennet Bo Fenner
created
15e7b67
markdown preview: Refresh preview when file is changed outside of the editor (#20175)
Click to expand commit body
Closes #20091
Release Notes:
- Fixed an issue where the markdown preview would not update when a
markdown file was changed outside of the editor
Closes #19417
Release Notes:
- vim : Added `r` and `a` as aliases for `[` and `<` text objects
(copying vim-surround).
- vim: (breaking change) rebound the function argument text object to
`g`.
- vim: Fixed surrounds to allow `b`/`B`/`r`/`a` anywhere you could use
`(`, `{`, `[`, `<`.
---
- vim: Added `b`, `B`, `r`, `s`, `a` as aliases for `()`, `{}`, `[]`,
`<>` in vim surround mode.
- Adds a new `surround_alias` function where aliases are defined.
- This function is used in `find_surround_pairs` to substitute the
chosen text with the alias
- The keymap is also modified to add support for Square and Angle
brackets when changing surrounds. These two were added to follow the
example of Tim Pope's ubiquitous `vim-surround` plugin.
- I had to overwrite the `vim::Argument` keybind in order to do this. I
moved it to use the `g` modifier. I realize this is a breaking change
and will happily move the `vim::AngleBracket` keymap to a different
letter if you'd like to avoid this. I'm just trying to keep with
convention. Ideally, Users would be able to define surround aliases
themselves in the config file but that's a much bigger task than I'm
able to do right now.
- I also added tests for the new aliases.
Thanks for making such a clean and organized codebase. I was able to
find the relevant section of code rather quickly thanks to this.
Mike Lloyd
created
4bbddca
extension: Add support for `labelDetails` for LSP completions (#20144)
Release Notes:
- Improved outline panel performance during large project searches
Kirill Bulatov
created
6316151
docs: Add redirect for /conversations (#20170)
Click to expand commit body
Release Notes:
- N/A
Peter Tripp
created
49a0a11
chore: Remove toolchain section from language settings (#20168)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
376a455
assistant: Improve role button loading state (#20125)
Click to expand commit body
We've received feedback that it wasn't clear how to cancel/interrupt the
LLM while it's generating a response. Additionally, I also had folks
telling me that the loading state was hard to notice—the pulsating
animation is too subtle on its own. This PR attempts to improve both of
these things. The end result is:

Release Notes:
- N/A
Danilo Leal
created
20eeb78
chore: Update BranchListDelegate to use WeakView<Workspace> (#20157)
Jason Lee
created
67be6ec
copilot: Add support for new models (#19968)
Click to expand commit body
Closes #19963
This PR implements integration with the newly announced GitHub Copilot
LLM models, including:
- Claude 3.5 Sonnet
- o1-mini
- o1-preview
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Closes #19061
I don't know should i add tooltip or not
Before

After

Release Notes:
- Markdown Preview: Added button to copy code blocks.
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Lilith Iris
and
Bennet Bo Fenner
created
c41a8e3
Fix file reloading not populating the history (#20156)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/20111
Closes https://github.com/zed-industries/zed/issues/20153
cc @mikayla-maki and @ConradIrwin
Release Notes:
- Fixed undo stack corruption on external file changes
([#20111](https://github.com/zed-industries/zed/issues/20111))
([#20153](https://github.com/zed-industries/zed/issues/20153))
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
Kirill Bulatov
and
Antonio Scandurra
created
25443a9
image viewer: Show path in breadcrumbs (#20155)
Click to expand commit body
Closes #10057
<img width="354" alt="image"
src="https://github.com/user-attachments/assets/47afe8fd-c8ac-45af-be9a-9ca8c5e066f6">
Release Notes:
- Show path in breadcrumbs/toolbar when opening an image
Bennet Bo Fenner
created
8e00caf
go: Add `go-generate` runnables and tasks (#19987)
Click to expand commit body
I was missing the `go generate` runnable from other editors so I figured
I'd implement one here! Now, comments of the form `//go:generate` can
prompt for the `go generate <package>` task. Meanwhile, I've also added
a global `go generate ./...` task.
~When making the global task, I noticed that the existing `go test
./...` task runs tests in subdirectories of the CWD of the active
editor, whereas I would really expect it to run all tests across my
project. I have changed to use the latter behavior (run relative to
project root) for both `go generate ./...` and `go test ./...`. Please
let me know if the prior behavior was intended, and I can revert.~
Release Notes:
- Added runnable and tasks for `go generate` commands
Roshan Padaki
created
9a869f0
project panel: Focus editor when single-clicking on file and preview tabs are disabled (#20154)
Click to expand commit body
Closes #4324
Release Notes:
- Fixed an issue where single-clicking on a file in the project panel
would not focus the editor, when preview tabs are disabled
Bennet Bo Fenner
created
de2483e
terminal: Do not show multibuffer hint when in centered pane (#20137)
Click to expand commit body
Co-Authored-by: Bennet <bennet@zed.dev>

Release Notes:
- Fixed an issue where the multibuffer hint was shown when terminal was
in centered mode
Co-authored-by: Bennet <bennet@zed.dev>
3b76ba6
docs: Align soft_wrap reference with naming pattern used (#20080)
Click to expand commit body
Release Notes:
- N/A
Henry Barreto
created
773a3b3
Expand selections to Replace block boundaries (#20092)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Max <max@zed.dev>
Richard Feldman
,
Antonio Scandurra
,
Max Brunsfeld
,
Antonio
, and
Max
created
b5c38e9
Remoting: Fix connecting to servers with long hostnames (#20093)
Click to expand commit body
Closes #20018
Release Notes:
- Remoting: Fixed connecting to hosts with long (>~50 character)
hostnames
Conrad Irwin
created
273173e
Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094)
Click to expand commit body
This PR reverts #20076 to turn the `ThemeRegistry` back into a regular
struct again.
It doesn't actually help us by having it behind a trait.
Release Notes:
- N/A
This PR adds a new `extension` crate, containing some contents extracted
from the `extension_host`.
Right now it contains just the `ExtensionManifest` and
`ExtensionBuilder`, although we may move more of the extension interface
into here.
The introduction of the `extension` crate allows us to depend on it in
the `extension_cli`, thereby eliminating the need for the `no-webrtc`
feature on a number of crates.
Release Notes:
- N/A
Marshall Bowers
created
ea44c51
Rename `extension` crate to `extension_host` (#20081)
Click to expand commit body
This PR renames the `extension` crate to `extension_host`.
This is to free up the name so that we can create a smaller-scoped
`extension` crate.
Release Notes:
- N/A
Marshall Bowers
created
c8f1969
Fix the outline panel's focus tracking (#20083)