Commit graph

17876 commits

Author SHA1 Message Date
Conrad Irwin
608addf641
Extension refactor (#20305)
This contains the main changes to the extensions crate from #20049. The
primary goal here is removing dependencies that we can't include on the
remote.


Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
2024-11-06 10:06:25 -07:00
Peter Tripp
1aac35cc1c
v0.162.x dev 2024-11-06 11:09:13 -05:00
Peter Tripp
815385cc5f
Add autoclosing braces for Shell Scripts (#20278)
Added support for autoclosing braces `{}` and single quotes `''` in Shell Scripts
2024-11-06 11:05:59 -05:00
Danilo Leal
71b3633c1b
assistant: Remove automatic diagnostic attachment to tab and file commands (#20297)
This PR returns the `/tab` and `/file` commands to their original
behavior of _not_ automatically including diagnostics. This is an
assistant-only change, though, given that we can already pass the
`/diagnostic` command by itself. The inline assistant will still have
the diagnostics baked in to allow prompts such as "Fix this error."

Release Notes:

- Remove automatic diagnostic attachment to tab and file commands in the
assistant panel

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-11-06 11:36:34 -03:00
Antonio Scandurra
21f778c6db
Reduce memory footprint for inline transformations (#20296)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes https://github.com/zed-industries/zed/issues/18062

This pull request prevents the `scores` matrix for the streaming diff
from growing quadratically.

Previously, we would store rows and columns respectively for all
characters in the old and new text. However, every time we receive a
chunk, we will always advance the position in the matrix to the very
latest character in the new text. This means we can avoid storing scores
for the new characters that were already reported.

Randomized tests still pass and I also made sure that the diffs we
produce are identical.

Release Notes:

- Improved memory footprint for inline transformations
([#18062](https://github.com/zed-industries/zed/issues/18062))
2024-11-06 15:07:16 +01:00
Roshan Padaki
1eb6fb0b5d
go: Run ./... tasks against current module (#20190)
In #17108, we updated `go test ./...` to run against the package
directory, to fix cases in which the top-level project is not the go
module root. However, this leads to the confusing behavior of `go test
./...` only running tests in subdirectories of the current package.
Here, we change the behavior to instead walk up the dirtree to find the
closest `go.mod`, and run the `./...` tasks relative to that directory.
This might lead to more predictable behavior for these tasks.

Also see:
https://github.com/zed-industries/zed/pull/19987#issuecomment-2450159099

Release Notes:

- Improved go test and generate `./...` commands to run against the
current go module directory rather than the current package directory
2024-11-06 14:55:57 +01:00
Ilya Sorochan
484e5df2ee
Add suggestion for CMake files (#20292)
Release Notes:

- Added NeoCMake extension suggestion for cmake files (`CMakeLists.txt`
and `.cmake`)
2024-11-06 14:51:26 +01:00
Piotr Osiewicz
fef7df667c
pane: Update pinned tab counts when unnamed buffer is discarded (#20294)
Closes #19492

Release Notes:

- Fixed a crash that could happen when closing a workspace with pinned
untitled buffers.
2024-11-06 13:58:51 +01:00
Kirill Bulatov
1c84fd1fef
Use Zed handler for undo and redo macOS actions (#20293)
Those seem to require a corresponding NSTextView/NSTextField with
explicitly enabled `allowsUndo` property. But Zed does not use any of
these *Text* elements, so there's nothing to allow undo on. Hence, use
the Zed handler, making both actions always enabled instead of being
always disabled.

Closes https://github.com/zed-industries/zed/issues/12335

Release Notes:

- Fixed undo and redo macOS menu items being always disabled
([#12335](https://github.com/zed-industries/zed/issues/12335))
2024-11-06 14:34:46 +02:00
Thorsten Ball
b6adab84a0
rope: Index tab locations for each chunk (#20289)
This is a follow-up to #19913 and adds another "index" to the `Chunk`,
this time indexing the location of tabs.

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-11-06 13:18:30 +01:00
Danilo Leal
d3a49f6d8f
assistant: Rename "new context" to "new chat" (#20043)
This PR is only updating UI strings and pieces of the documentation—it
doesn't touch the actual code, where it's still using things such as
`NewContext` and similar terminology for variables, actions, etc.

Release Notes:

- N/A
2024-11-06 07:24:04 -03:00
Thorsten Ball
bd03dea296
git: Add support for opening git worktrees (#20164)
This adds support for [git
worktrees](https://matklad.github.io/2024/07/25/git-worktrees.html). It
fixes the errors that show up (git blame not working) and actually adds
support for detecting git changes in a `.git` folder that's outside of
our path (and not even in the ancestor chain of our root path).

(While working on this we discovered that our `.gitignore` handling is
not 100% correct. For example: we do stop processing `.gitignore` files
once we found a `.git` repository and don't go further up the ancestors,
which is correct, but then we also don't take into account the
`excludesFile` that a user might have configured, see:
https://git-scm.com/docs/gitignore)


Closes https://github.com/zed-industries/zed/issues/19842
Closes https://github.com/zed-industries/zed/issues/4670

Release Notes:

- Added support for git worktrees. Zed can now open git worktrees and
the git status in them is correctly handled.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
2024-11-06 09:43:39 +01:00
Danilo Leal
3f777f0c68
Fix project panel losing focus after file creation attempt (#20273)
Closes https://github.com/zed-industries/zed/issues/19771

### Before

When pressing <kbd>esc</kbd> after attempting to create a file, the
focus is lost and you don't know where it went.


https://github.com/user-attachments/assets/2ccd82b7-b7d2-49e4-b1c7-1867331ab9dc

### After

Now, after pressing <kbd>esc</kbd>, the focus returns to where it was
before trying to create a new file.


https://github.com/user-attachments/assets/a8eb1cf1-dfef-42eb-9f3d-2ab6200056c4

Release Notes:

- Fix project panel losing focus after file creation attempt
([#19771](https://github.com/zed-industries/zed/issues/19771))

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2024-11-06 09:59:06 +02:00
Conrad Irwin
846aec701f
Remoting: Fix opening multiple folders on one server (#20281)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Release Notes:

- Remoting: Fix opening multiple folders on one server
2024-11-05 22:16:38 -07:00
Conrad Irwin
803e5d4c9f
vim: Fix readonly mode (#20264)
Closes #18854

Release Notes:

- vim: Fixed `r`, `~` etc. appearing to modify readonly buffers
2024-11-05 21:45:45 -07:00
AidanV
c10c35ffda
Fix duplicate SshProject's in Remote Projects menu (#20271)
Closes #20269

Release Notes:

- Changes SshConnection to use a BTreeSet of SshProject's instead of a
Vec of SshProject's in order to remove duplicate remote projects from
"settings.json" and the Remote Projects menu.
2024-11-05 21:31:57 -07:00
Conrad Irwin
38b1940251
Re-entrant SendKeystrokes (#20277)
Release Notes:

- Improved `workspace::SendKeystrokes` to support re-binding keys. For
example you can now do: `"x": ["workspace::SendKeystrokes", "\" _ x"]`
in vim mode to ensure that `x` does not clobber your clipboard.
- Improved key binding documentation
2024-11-05 21:18:16 -07:00
Max Brunsfeld
50069a2153
Unbind app menu actions (#20268)
Closes #7544

Release Notes:

- Fixed an issue that prevented removing key bindings for actions used
in the macOS application menu.
2024-11-05 16:18:41 -08:00
Kirill Bulatov
b23835b5a5
Disable sccache during dev extension builds (#20270) 2024-11-06 02:01:56 +02:00
Nathan Sobo
e47b305ca7
Use correct context path for focused element in WindowContext::bindings_for_action (#18843)
Previously, we were reaching in and using the context_stack on the dispatch tree, which was incorrect.

/cc @as-cii 
/cc @ConradIrwin

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
2024-11-05 16:42:50 -07:00
Kirill Bulatov
282f6241b7
Fix outline panel selection races (#20263)
Follow-up of https://github.com/zed-industries/zed/pull/20211

Release Notes:

- N/A
2024-11-06 00:54:15 +02:00
Conrad Irwin
236498408f
Use zed-style shifted letters (#20254)
Release Notes:

- vim: Fixed some shortcuts to render correctly in Command
2024-11-05 15:51:52 -07:00
Conrad Irwin
86ff6e2c8e
vim: Fix paragraphs with softwrap (#20259)
Closes #19778

Release Notes:

- vim: Fixed paragraph object in the presence of softwrap
2024-11-05 15:32:44 -07:00
Conrad Irwin
4bf6fb217e
vim: Fix search in the Assistant (#20258)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes #17704

Release Notes:

- vim: Fix search in the assistant panel
2024-11-05 15:08:01 -07:00
Mikayla Maki
c527f2e212
Prevent extra line break on long token at start of rewrap (#20256)
Closes #19532

Release Notes:

- Fixed a bug where rewrapping with a long word at the start of the line
would cause a new line to be inserted.

Co-authored-by: Will Bradley <will@zed.dev>
2024-11-05 14:58:07 -07:00
Will Bradley
6dfff1b46d
Improve rewrap for ideographic writing systems (#20218)
Closes #19733

Before:

https://github.com/user-attachments/assets/5399e8fd-2687-445a-a8ab-023c348aff3f

After:

https://github.com/user-attachments/assets/b4ea5cb6-92ec-49ae-a982-194a1fc68d88

Release Notes:

- improve handling of text wrapping in Rewrap for some ideographic
writing systems

Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-11-05 14:22:21 -07:00
Conrad Irwin
66e06616db
Don't write temp files for telemetry logs (#20209)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
This still keeps a telemetry.log for the current session, but not one
file per load of zed.

Closes: #20045

Release Notes:

- Fixed a bug where Zed would create a new temporary file on each boot
for telemetry logs
2024-11-05 14:05:51 -07:00
Conrad Irwin
765626a007
Disable /search by default (#20252)
This stops us sending GetCachedEmbeddings requests which frequently time
out
after 10s, and block the collab connection.

Release Notes:

- N/A
2024-11-05 14:05:10 -07:00
Kirill Bulatov
27cdc6cb93
Reuse focused buffer search query in the project search (#20253)
Closes https://github.com/zed-industries/zed/issues/10011

Release Notes:

- Reuse focused buffer search query in the project search
([#10011](https://github.com/zed-industries/zed/issues/10011))
2024-11-05 22:57:08 +02:00
Conrad Irwin
87ba5fd7bc
Rebuild SSH installation (#20220)
Closes #ISSUE

This refactors SSH installation to require less shell stuff. We'd like
to
support arbitrary remote hosts, and unfortunately csh/tcsh have quoting
rules
that make it impossible to run multi-line scripts.

The primary changes are:
* The target path now contains the version:
`./zed_server/zed-remote-server-{release_channel}-{version}`
* We do all our processing in a temporary file and `mv` it into place.
* We do fewer calls to `ssh_command` overall. With the previous two
changes we can avoid lock files, and fuser calls. Instead cleanup of old
binaries now happens in `execute_run`.
* We only try to install the remote server when the connection is
established, not on each project open.

This should also put us in a good position if we want to pre-emptively
install new versions when the auto-updater detects an update for the
running version of zed (but that's not wired up yet)

Release Notes:

- Remoting: Fixed remoting when the remote runs `tcsh`
- Remoting: Improved latency of connecting
2024-11-05 13:37:54 -07:00
Danilo Leal
9e49894ed6
assistant: Remove the selection action as an extra option (#20234)
This PR should only be merged after
https://github.com/zed-industries/zed/pull/19988. Once the selection
action is added as a "proper" slash command, there's no need to have it
duplicate on the "Add Context" menu anymore. 😄

Release Notes:

- N/A
2024-11-05 15:00:43 -03:00
Tristan Marechaux
2364804f17
assistant: Implement /selection slash command (#19988)
- Closes #18868

## Summary
This PR introduces a new slash command `/selection` to enhance the
usability of the assistant's quote selection feature.

## Changes Made
1. Extracted a function from the `assistant: quote selection` action to
find the selected text and format it as an assistant section.
2. Created a new slash command `/selection` that utilizes the extracted
function to achieve the same effect as the existing `assistant: quote
selection` action.
3. Updated the documentation to include information about the new
`/selection` slash command.


Release Notes:

- Moved the text selection action to a slash command (`/selection`) in
the assistant panel

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2024-11-05 18:42:10 +01:00
Peter Tripp
db11a3b554
ci: Update issue templates. Rename defect to bug and improve log formatting (#20246) 2024-11-05 12:07:17 -05:00
Danilo Leal
d0ca49f0e1
Make project search inputs full width (#20242)
Closes https://github.com/zed-industries/zed/issues/13099

This PR main thing is making the inputs in the project search full
width, but it also has some slight design and UI code improvements here
and there, such as extracting the common input styles to its own
variable.

I figure that the reason why the inputs weren't full width before is
just because it'd be hard to reach for the buttons when in a large
monitor with the app maximised _and_ with a single tab open. However, I
do feel like it's common not to have these conditions in place, too,
which make the small inputs too small, like the issue states. At the
very least, we also have the keybindings.

Here's the final result:

| Small window size | Big window size |
|--------|--------|
| <img width="1279" alt="Screenshot 2024-11-05 at 11 18 08"
src="https://github.com/user-attachments/assets/73548300-1ad2-4ed0-b99f-adb3212ac163">
| <img width="2992" alt="Screenshot 2024-11-05 at 11 24 06"
src="https://github.com/user-attachments/assets/3a1ccabd-2350-42f0-8e31-112f27da98a4">
|

Release Notes:

- N/A
2024-11-05 13:04:42 -03:00
Alex Viscreanu
bc3550d991
workspace: Add settings to dim inactive panes and highlight active pane (#18968)
Closes #12529
Closes #8639

Release Notes:

- Added option to dim inactive panes
([#12529](https://github.com/zed-industries/zed/issues/12529))
- Added option to highlight active pane with a border
([#8639](https://github.com/zed-industries/zed/issues/8639))

BREAKING: `active_pane_magnification` value is no longer used, it should
be migrated to `active_pane_modifiers.magnification`


![panes](https://github.com/user-attachments/assets/b19959bc-4c06-4320-be36-412113143af5)

> note: don't know much rust, so I wouldn't be surprised if stuff can be
done much better, happy to update things after the review.
Also, wasn't sure about introducing the new object in the settings, but
it felt better than adding two more keys to the root, let me know what
you think and if there's a better way to do this. Also happy to get
feedback on the text itself, as I didn't spend much thinking how to
document this.
2024-11-05 17:26:07 +02:00
Thorsten Ball
7fb9549098
vim: Fix d shift-g not deleting until EOD if soft-wrap is on (#20160)
This previously didn't work: `d G` would delete to the end of the "first
of the soft-wrapped lines" of the last line.

To fix it, we special case the delete behavior for `shift-g`, which is
what Neovim also seems to do.


Release Notes:

- Fixed `d G` in Vim mode not deleting until the actual end of the
document if soft-wrap is turned on.
2024-11-05 14:47:14 +01:00
Piotr Osiewicz
4097118070
ui: Fix scrollbar content size calculation for non-uniform lists with single element (#20237)
Previously we were always adding the origin coordinate of last item to
the content size, which is incorrect when the list has just one item; in
that case, we should just use the size of that item as the content size
of a list.

Closes #ISSUE

Release Notes:

- N/A
2024-11-05 14:32:13 +01:00
Stanislav Alekseev
a26c0a8537
Fix toolchain detection for worktree-local paths (#20229)
Reimplements `pet::EnvironmentApi`, trying to access the `project_env`
first
Closes #20177 

Release Notes:

- Fixed python toolchain detection when worktree local path is set
2024-11-05 14:25:18 +01:00
Stephan Aßmus
f8bd6c66f4
Fix cursor shape flickering and dead-zone on 1px border around list items in project and outline panels (#20202)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
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>
2024-11-05 14:26:20 +02:00
Danilo Leal
02b1e3a3c1
assistant: Adjust the toolbar design (#20101)
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
2024-11-05 09:07:26 -03:00
Alvaro Parker
83ad28dfe7
Remove duplicate load_system_fontscall (#19374)
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
2024-11-05 12:43:22 +02:00
Conrad Irwin
17b9d1976f
Fix buffer restoration on ssh projects (#20215)
Closes #20143

Release Notes:

- Remoting: Fixed a panic restoring unsaved untitled buffers over SSH
2024-11-04 23:05:52 -07:00
Kirill Bulatov
3856599853
Improve project search performance (#20211)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
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
2024-11-05 03:49:37 +02:00
Piotr Osiewicz
2965119201
project panel: scroll when drag-hovering over the edge of a list (#20207)
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.
2024-11-05 00:56:58 +01:00
Max Brunsfeld
258cf6c746
Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206)
Closes #9195
Closes #19787

Release Notes:

- Fixed an issue where single quotation marks were spuriously
auto-closed when typing in line comments
2024-11-04 15:36:39 -08:00
Richard Feldman
369de400be
Make rewrapping take tabs more into account (#20196)
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>
2024-11-04 18:10:40 -05:00
Piotr Osiewicz
dc02894db4
editor: Add scrollbar to info popovers (#20184)
Related to https://github.com/zed-industries/zed/issues/5034

Release Notes:

- Added scrollbar to info popovers in editor.
2024-11-05 00:08:38 +01:00
Patrick Sy
966b18e142
assistant: Fix Gemini 1.5 Pro throwing "missing field 'index' at line N column M" (#20200)
Closes https://github.com/zed-industries/zed/issues/20033

- Fixed deserialization error of `GenerateContentCandidate` where `index` is unexpectedly nil
2024-11-04 17:01:08 -05:00
Kirill Bulatov
24dba07a9b
Do not alter soft wrap based on .editorconfig contents (#20198)
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))
2024-11-04 23:31:40 +02:00
Marshall Bowers
16e9b4ceeb
typescript: Improve installation checks for vtsls (#20197)
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.
2024-11-04 16:00:51 -05:00