Commit Graph
31406 Commits
Author SHA1 Message Date
Conrad Irwin 6ef1e48a77 Add a mode indicator for vim
This is the second most common remaining complaint (after :w not
working).

Fixes: zed-industries/community#409
2023-07-21 16:06:14 -06:00
Max Brunsfeld 923cdeb690 Avoid performance bottlenecks from git status calls during worktree scanning (#2777)
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:

![before](https://github.com/zed-industries/zed/assets/326587/627012f2-6131-44ac-95c2-ea4a4531cb24)

After:

![after](https://github.com/zed-industries/zed/assets/326587/a11a3e1b-e925-4bff-a421-ea71cb4de85d)


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))
2023-07-21 14:46:53 -07:00
Kirill Bulatov 41ce4a33e0 Do not scroll when selecting all 2023-07-22 00:17:02 +03:00
Max Brunsfeld 3146f7052a Retrieve git statuses in one batch when scanning dirs 2023-07-21 13:50:54 -07:00
Kirill Bulatov 09297bd2f3 When renaming in project panel, select file names without extensions (#2776)
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
2023-07-21 23:30:55 +03:00
Kirill Bulatov 1acf2b8397 Add search in directory action in the project panel (#2774)
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
2023-07-21 23:25:45 +03:00
Kirill Bulatov 8fd476141a When renaming in project panel, select file names without extensions 2023-07-21 23:22:22 +03:00
Julia 4f85bd2ec3 Put our downloaded copy of Node in the env for every NPM action
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
2023-07-21 16:13:00 -04:00
Kirill Bulatov aae5cf61e1 Add search in directory action in the project panel 2023-07-21 22:47:57 +03:00
Julia 6241c9f305 Avoid panic from assuming a vim operator exists on the operator stack (#2773)
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.
2023-07-21 14:47:38 -04:00
Julia ba89ca0ddb Avoid panic from assuming a vim operator exists on the operator stack 2023-07-21 14:25:30 -04:00
Conrad Irwin f73e9f73b5 Vim shortcuts (#2760)
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
2023-07-21 10:31:18 -06:00
Conrad Irwin 5ddb6c1db0 vim: add , and ; 2023-07-21 09:50:22 -06:00
Conrad Irwin 0f8a1759ae Quality of life shortcuts for code actions 2023-07-21 09:47:15 -06:00
Conrad Irwin a29e2eb5d4 refactor: Remove G/Z Namespace support
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.
2023-07-21 09:47:14 -06:00
Conrad Irwin e6a9730bfa Fix shift-enter in search (#2772)
Fixes shift-enter to go to previous result.

Release Notes:

- To type a newline in search use `ctrl-enter` (or `ctrl-shift-enter`
for a newline below).
2023-07-21 09:23:04 -06:00
Conrad Irwin 06405e4e19 Fix shift-enter in search
If you want to type a newline in an auto_height editor, ctrl and
ctrl-shift are your friends.
2023-07-21 09:10:12 -06:00
Joseph T. Lyons f44ce51e54 Add key binding to close all docks (#2769)
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`).
2023-07-21 11:08:43 -04:00
Alex Viscreanu 9a31609357 feat(workspace): add action for closing inactive editors on all panes 2023-07-21 13:16:00 +02:00
Kirill Bulatov 8d71697255 Do not highlight fake URLs in terminal 2023-07-21 11:28:56 +03:00
Joseph T. Lyons cd9caa8011 Add key binding to close all docks 2023-07-21 02:44:44 -04:00
Conrad Irwin bf78cb5f92 Fix enter in search (#2768)
Fixes a regression in non-vim search caused by my changes to vim search.

Release Notes:

- N/A
2023-07-20 20:53:31 -06:00
Conrad Irwin 94bdefefbe Fix enter in search 2023-07-20 20:48:36 -06:00
Mikayla Maki fdc4bc9cbc bump the brightness of the active wrap guide 2023-07-20 16:45:41 -07:00
Mikayla Maki 167d34be50 Add wrap guides and associated settings 2023-07-20 16:39:13 -07:00
Max BrunsfeldandKyle c819208897 Optimize glob filtering of semantic search
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-20 14:23:11 -07:00
Mikayla Maki 7371d64993 Folder icons (#2764)
- Updates icons and adds more
- Adds ability to choose folders or chevrons in user settings
- Adds ability to set indent size in user settings
2023-07-20 13:59:21 -07:00
Mikayla Maki 8dbc619544 fmt 2023-07-20 13:45:19 -07:00
Joseph T. Lyons a070a9a828 Reuse previously-obtained call object 2023-07-20 16:21:21 -04:00
Joseph T. Lyons 837c2b50d7 Add microphone toggle events (#2765)
Release Notes:

- N/A
2023-07-20 16:10:20 -04:00
Joseph T. Lyons 1cfe740c92 Add microphone events to calls 2023-07-20 16:00:11 -04:00
Joseph T. Lyons 51469f93f3 Remove unused method 2023-07-20 15:54:26 -04:00
Julia 4965bc1477 In macOS platform layer map a ctrl-click to a right click (#2755)
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)).
2023-07-20 14:54:55 -04:00
Derek Briggs 083552ec62 add indent size to project panel settings 2023-07-20 12:30:35 -06:00
Derek Briggs 6bc776e7e9 organize settings 2023-07-20 12:23:47 -06:00
Derek Briggs 2ce3481068 Allow for folders or chevrons 2023-07-20 12:23:28 -06:00
Nate Butler b1da303222 Add the local and declare keywords to bash syntax highlighting (#2761)
Release Notes:

- Improved Bash / Shell Script syntax highlighting
2023-07-20 14:17:29 -04:00
Derek Briggs 183f95508a Add moar icons 2023-07-20 12:01:41 -06:00
KCaverly db2312ab5d add glob filtering functionality to semantic search 2023-07-20 13:46:27 -04:00
Mikayla Maki c3b5d0453c fmt 2023-07-20 10:36:23 -07:00
Mikayla Maki 6d3e51ea54 Add a double click to reset resized splits 2023-07-20 10:33:28 -07:00
Nate Butler d7aeeef42f Add the local and declare keywords to bash syntax highlighting 2023-07-20 13:18:15 -04:00
Conrad Irwin b4b1df5fee Add workspace::ActivatePaneInDirection (#2757)
This change adds support for choosing a pane based on direction; and
adds default keybindings (`cmd+k cmd+{left,right,up,down}`) and vim
keybindings.

Release Notes:

- Add support for navigating to the next pane in a given direction using
`cmd+k cmd-{up,down,left,right}`
([#476](https://github.com/zed-industries/community/issues/476),
[#478](https://github.com/zed-industries/community/issues/478))
- Vim: adds support for many window related shortcuts: `ctrl-w
{h,j,k,l,up,down,left,right,w,W,p}` for navigating around panes, `ctrl-w
{q,c}` for closing panes and `ctrl-w {v,s}` for splitting panes.
2023-07-20 11:17:13 -06:00
Conrad Irwin 7361cda15a Ignore off-screen cursors 2023-07-20 11:11:47 -06:00
Conrad Irwin 40e8fc2213 Assertions for assumptions 2023-07-20 11:11:37 -06:00
Conrad Irwin d424988245 Better calculation of pane distance 2023-07-20 11:06:16 -06:00
Kirill Bulatov ce4edb3375 Fully revert the line height change 2023-07-20 15:39:22 +03:00
Kirill Bulatov e39b713496 Keep basic line height for single line editors 2023-07-20 13:42:11 +03:00
Kirill Bulatov 923d7d849c Properly display keybindings in context menus 2023-07-20 12:18:04 +03:00
Conrad Irwin 6ab5bd0aff Add support for activating a pane by direction
Contributes: zed-industries/community#476
Contributes: zed-industries/community#478
2023-07-19 18:29:11 -06:00