@mikayla-maki for 👀
[This PR added in the ability to rename a file via
`enter`](https://github.com/zed-industries/zed/pull/2784). Previously,
`enter` was used to both open a file and confirm a rename, so this PR
changes the opening of a file to use `space`, which is what VS Code
uses. It also makes a bit more sense because now `enter` is just used to
start a rename and confirm the rename, vs being used for 2 different
actions.
N/A on the release notes, as I adjusted the release note in the
previously-tagged PR.
Release Notes:
- N/A
Follow-up to https://github.com/zed-industries/zed/pull/2777
Refs https://github.com/zed-industries/community/issues/1770
In this PR, I reworked the way that git statuses are retrieved. In a
huge repository like `WebKit`, the really slow part of computing a list
of git statuses is the *unstaged* portion of the diff. For the *staged*
diff, `git` can avoid comparing the contents of unchanged directories,
because the index contains hashes of every tree. But for the *unstaged*
portion, Git needs to compare every file in the worktree against the
index. In the common case, when there are no changes, it's enough to
check the `mtime` of every file (because the index stores the mtimes of
files when they are added). But this still requires an `lstat` call to
retrieve each file's metadata.
I realized that this is redundant work, because the worktree is
*already* calling `lstat` on every file, and caching their metadata. So
in this PR, I've changed the `Repository` API so that there are separate
methods for retrieving a file's *staged* and *unstaged* statuses. The
*staged* statuses are retrieved in one giant batch, like before, to
reduce our git calls (which also have an inherent cost). But the
`unstaged` statuses are retrieved one-by-one, after we load files'
mtimes. Often, all that's required is an index lookup, and an mtime
comparison.
With this optimization, it once again becomes pretty responsive to open
`WebKit` or `chromium` in Zed.
Release Notes:
- Optimized the loading of project file when working in very large git
repositories
Further improves terminal navigation with cmd+click, now allowing to
open paths starting with `~` (if they are present otherwise) and
focusing project panel with highlighted entry for the directories
opened.
Release Notes:
- Further improves terminal navigation with cmd+click, now allowing to
open paths starting with `~` (if they are present otherwise) and
focusing project panel with highlighted entry for the directories
opened.
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
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.
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
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.
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`).
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">