Commit log

cdceddd update semantic index tests for elixir

KCaverly created

4085df5 Add tests for manipulate_lines()

Joseph T. Lyons created

64b252e A little refactor

Click to expand commit body
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>

Conrad Irwin and Mikayla Maki created

bf2ca57 Remove { and } from single-line closure

Joseph T. Lyons created

b5630eb Merge branch 'main' into quinn/nix

Mikayla Maki created

c32fd57 Add support for Elm and GLSL (#2782)

Click to expand commit body
This adds tree-sitter grammars for both Elm and GLSL, with injections
for GLSL embedded within Elm. It also adds an `outline.scm` for Elm,
though limitations in the tree-sitter grammar meant that I wasn't able
to get it looking exactly how I'd have liked.

In particular, it wasn't clear how to nicely annotate functions in the
outline as being functions, or how to prevent the fields of a record
declaration from being increasingly indented.


![image](https://github.com/zed-industries/zed/assets/285821/544bc00b-3bfc-4ec7-be9d-764b9f0292ab)

![image](https://github.com/zed-industries/zed/assets/285821/74e57e95-bf87-4989-ae29-a2f625141bcf)

![image](https://github.com/zed-industries/zed/assets/285821/9e283c78-66d5-4c15-9827-1b5b446cdc37)

fixes https://github.com/zed-industries/community/issues/598

Release Notes:
- Added syntax highlighting for the Elm and GLSL languages

Mikayla Maki created

93ec73d Fix code computing new selections

Click to expand commit body
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>

Joseph T. Lyons and Mikayla Maki created

97c3d97 update semantic index tests for cpp

KCaverly created

1f65eff Update status bar theming

Click to expand commit body
Co-Authored-By: Nate Butler <iamnbutler@gmail.com>

Conrad Irwin and Nate Butler created

299818c Fix rand import and tweak callbacks

Click to expand commit body
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>

Joseph T. Lyons and Julia created

c86096a update semantic index tests for javascript

KCaverly created

1a84382 WIP

Joseph T. Lyons created

bdd0b9f Add open file in project finder via space (#2785)

Click to expand commit body
@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

Joseph T. Lyons created

a01d973 More git status optimizations (#2779)

Click to expand commit body
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

Max Brunsfeld created

e199a6a Highlight all Elm function calls

Quinn Wilton created

7603659 Add MacOS standard key binding for file renames (#2784)

Click to expand commit body
Release Notes:

- Added a default keybinding for using enter to rename files in the
project panel

Mikayla Maki created

3cc8890 Add all Elm functions to the outline, including locals

Quinn Wilton created

62ee52a Highlight qualified Elm function calls

Quinn Wilton created

fbe0108 Highlight Elm arrows as keywords

Quinn Wilton created

4110513 Add MacOS standard key binding for file renames

Mikayla Maki created

d95c4fd Remove unbound highlight queries

Mikayla Maki created

baa16a2 Better method ordering

Conrad Irwin created

ea74734 Touch up elm tree sitter integration

Mikayla Maki created

43d94e3 Refactor mode indicator to remove itself

Click to expand commit body
One of the problems we had is that the status_bar shows a gap between
items, and we want to not add an additional gap for an invisible status
indicator.

Conrad Irwin created

25e4bce Implement cascading resize algorithm

Mikayla Maki created

52154f7 Fixes a crash when SelectAllMatches action was called on no matches (#2783)

Click to expand commit body
Release Notes:

- Fixes a crash when SelectAllMatches action was called on no matches

Kirill Bulatov created

7dccb48 Fixes a crash when SelectAllMatches action was called on no matches

Kirill Bulatov created

6ad0852 Add outline.scm for Elm

Quinn Wilton created

dd504f5 Add tree-sitter-glsl

Quinn Wilton created

a4914fc Add tree-sitter-elm

Quinn Wilton created

8fff0b0 Fix pathspec in staged_statuses

Click to expand commit body
Enable non-literal matching so that directory paths match
all files contained within them.

Max Brunsfeld created

fe388ed Add tree-sitter-nix

Quinn Wilton created

429a2fc Add drag end events

Click to expand commit body
Fix left dragging cascade
WIP: Implement right dragging, WIP: use drag end events to set and reset state around initial flex orientation

Mikayla Maki created

28ee05b WIP: cascade split resizes

Mikayla Maki created

b4b53eb Refactor resize handle code to be amenable to cascading resizes

Mikayla Maki created

a3a9d02 Fix filtering of staged statuses

Max Brunsfeld created

b338ffe Rely on git status for any paths not matching the git index

Max Brunsfeld created

e091519 In terminal, open paths starting with ~ and focus on project panel when opening directories (#2780)

Click to expand commit body
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.

Kirill Bulatov created

f05095a Focus project panel on directory select

Kirill Bulatov created

6c09782 Optimize full file status via passing in known file mtime

Max Brunsfeld created

51d311a Compute unstaged git status separately, to take advantage of our cached file mtimes

Max Brunsfeld created

ff08640 Only fetch statuses for changed paths

Max Brunsfeld created

05b1611 Don't call git status when ignored files change

Max Brunsfeld created

dcaf8a9 Open paths starting with ~ from terminal click

Kirill Bulatov created

d14a484 Add support for adding/removing status items

Conrad Irwin created

4589164 Add a mode indicator for vim

Click to expand commit body
This is the second most common remaining complaint (after :w not
working).

Fixes: zed-industries/community#409

Conrad Irwin created

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:

![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))

Max Brunsfeld created

bd9118f Do not scroll when selecting all (#2778)

Click to expand commit body
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

Kirill Bulatov created

c538504 Do not scroll when selecting all

Kirill Bulatov created

4bd415f Retrieve git statuses in one batch when scanning dirs

Max Brunsfeld created