7788eab
Avoid performance bottlenecks from `git status` calls during worktree scanning (#2777)
Click to expand commit body
Closes
https://linear.app/zed-industries/issue/Z-2689/huge-slowdown-when-working-in-large-git-repositories-like-webkit
Closes https://github.com/zed-industries/community/issues/1770
In large git repositories (like Webkit), `git status` can be very slow.
And our current approach of retrieving git statuses (one by one as we
load paths), causes catastrophic slowdowns in these repos. This PR
further optimizes our retrieval of git statuses (started in
https://github.com/zed-industries/zed/pull/2728), so that when scanning
a directory, we only load git statuses once, in a single batch, at the
beginning of the scan.
There is still an initial lag when opening `WebKit` in Zed, while the
initial git status runs. But once this call completes, everything is
fast. Let's come back to this problem later.
For now, this makes Zed's directory scanning massively more efficient,
even in the case of normal-sized repos like `zed`. The git status code
was a huge percentage of zed's CPU usage when launching. Here is that
code, highlighted in a flamegraph before and after this change:
Before:

After:

Release Notes:
- Fixed a bug where project paths took a very long time to load when
working in large git repositories
([#1770](https://github.com/zed-industries/community/issues/1770))
In big buffers, when I press `cmd-a`, the view gets scrolled to the very
bottom.
Usually it's now that I want, I can scroll to bottom with `cmd-down`
separately, and selecting all text is used for copy-pasting it
somewhere, no need to scroll anywhere for that — I can get back to the
same place later.
Release Notes:
- Removed the scroll to the end of the editor after `editor::SelectAll`
action
4bd415f
Retrieve git statuses in one batch when scanning dirs
Max Brunsfeld
created
25ea07c
When renaming in project panel, select file names without extensions (#2776)
Click to expand commit body
Closes
https://github.com/zed-industries/community/issues/1789#issuecomment-1646061712
<img width="196" alt="Screenshot 2023-07-21 at 23 23 47"
src="https://github.com/zed-industries/zed/assets/2690773/f5c7025b-6dc8-4f0c-81e5-3cc98a3a9c8b">
<img width="197" alt="Screenshot 2023-07-21 at 23 23 52"
src="https://github.com/zed-industries/zed/assets/2690773/596f8ab0-15e0-4285-be34-ce4c276b686f">
When renaming in project panel, select file names without extensions.
Release Notes:
- Improved project panel rename by selecting file names without
extensions
Kirill Bulatov
created
33b215a
Add search in directory action in the project panel (#2774)
Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/1153
Closes https://github.com/zed-industries/community/issues/1326
<img width="432" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/a50ee073-9d2e-4e5c-ae5e-23312693c540">
Adds an `project_panel::NewSearchInDirectory` action ("alt-shift-f"
default) in the project editor context to open a new project search in
the selected directory.
Release Notes:
- Adds an action to open project search in the project panel's directory
Kirill Bulatov
created
f2c9738
Put our downloaded copy of Node in the env for every NPM action (#2775)
Click to expand commit body
Intelephense (PHP language server) has a dependency on `protobufjs`
which invokes `node` in the `postinstall` script and if the user did not
have a system Node runtime installed that would fail. Have this use our
downloaded installation too
Fixes
https://linear.app/zed-industries/issue/Z-2687/php-language-server-failed
Release Notes:
- Fixed PHP language server installation on systems without a system
Node installation.
Julia
created
804da68
When renaming in project panel, select file names without extensions
Kirill Bulatov
created
2d81599
Put our downloaded copy of Node in the env for every NPM action
Click to expand commit body
Intelephense (PHP language server) has a dependency on `protobufjs`
which invokes `node` in the `postinstall` script and if the user did
not have a system Node runtime installed that would fail. Have this
use our downloaded installation too
Julia
created
595bc16
Add search in directory action in the project panel
Kirill Bulatov
created
e002d9e
Avoid panic from assuming a vim operator exists on the operator stack (#2773)
Click to expand commit body
Fixes
https://linear.app/zed-industries/issue/Z-338/operator-popped-when-no-operator-was-on-the-stack-this-likely-means
Release Notes:
- Fixed a panic that could occur when invoking a Vim object without an
operator.
Julia
created
243a1a8
Avoid panic from assuming a vim operator exists on the operator stack
Refactors some of the vim bindings to make the vim.json file less
obtuse.
Release Notes:
- vim: add `;` and `,` to repeat last `{f,F,t,T}`
- vim: add zed-specific shortcuts for common IDE actions:
- - `g A` to find all references
- - `g .` to open the code actions menu.
- - `c d` for rename
This previously enabled things like `d g g` to work, but we can
fix that instead by not clearing out pending vim state on change.
Either way, it is unnecessary and causes some user-confusion
(zed-industries/community#176), so remove this code for now; and use
comments to organize the file a bit instead.
If you want to type a newline in an auto_height editor, ctrl and
ctrl-shift are your friends.
Conrad Irwin
created
5f89de0
Add key binding to close all docks (#2769)
Click to expand commit body
Fixes:
https://linear.app/zed-industries/issue/Z-2680/add-a-close-all-docks-action
I frequently get stuck in this state:
<img width="1608" alt="SCR-20230721-dgvs"
src="https://github.com/zed-industries/zed/assets/19867440/13257e6d-f75a-4d1c-9718-153499e90c60">
I could zoom, but I dont want to in this case, I just want to close
everything, to get back to a truly decluttered state. Running 3 toggle
commands is cumbersome. I'd like to be able to close all docks with one
action.
I added an action with the key binding `alt-cmd-y` (similar
to`alt-cmd-t`, which is used to close all tabs). My original choice was
`alt-cmd-d` (`d` for dock), but that is the default macOS key binding to
hide the system dock.
Release Notes:
- Added a `workspace: close all docks` action (deployed via
`alt-cmd-y`).
Joseph T. Lyons
created
1610e27
feat(workspace): add action for closing inactive editors on all panes
Alex Viscreanu
created
35400d5
Do not highlight fake URLs in terminal (#2770)
Click to expand commit body
Closes https://github.com/zed-industries/community/issues/1794
See also https://github.com/alacritty/alacritty/pull/7101
Release Notes:
- Fixed terminal incorrectly highlighting certain strings as URLs
fixes https://github.com/zed-industries/community/issues/48
Release notes
- Added wrap guides and two associated language settings:
`"show_wrap_guides": bool` and `"wrap_guides": [..]`. The first controls
whether wrap guides are shown when `"soft_wrap":
"preferred_line_length"` is enabled and the second allows Zed to show
additional wrap guides at whichever column index you prefer.
Here's a screenshot of Zed with wrap guides at 60 and 90, and soft wrap
active with a preferred_line_length of 80:
<img width="956" alt="Screenshot 2023-07-20 at 4 42 11 PM"
src="https://github.com/zed-industries/zed/assets/2280405/48f36be1-3bdc-48eb-bfca-e61fcfd6dbc2">
Mikayla Maki
created
05a8409
bump the brightness of the active wrap guide
0b61556
In macOS platform layer map a ctrl-click to a right click (#2755)
Click to expand commit body
Maps a ctrl left down event into a ctrl-less right down and then up pair
and filters out ctrl left up. Hopefully this ensures that mouse down/up
events remain balanced and somewhat matching.
Release Notes:
- Added the ability to ctrl-click in place of right click to summon
context menus
([#1150](https://github.com/zed-industries/community/issues/1150)).