Commit Graph

972 Commits

Author SHA1 Message Date
Julia
5e39ba596e Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
Julia
f40c498491 Fix tests 2023-05-25 14:29:28 -04:00
Julia
8d662edb6c Remove concept of git diff refresh from Item trait 2023-05-25 14:29:28 -04:00
Julia
cede296b04 Project level git diff recalc handling
This avoids an issue where in a many-buffer multi-buffer, each modified
buffer could complete its recalc independently, causing a cascade of
repeated notifies

Now all recalcs started at the same time must complete before
 A: Starting another recalc pass
 B: The master notify occurring

Each buffer can still show its new diff if something else triggers it
to notify earlier, this is desirable and does not have the same negative
effects as the notify cascade as those re-layouts would need to happen
anyway

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-05-25 14:10:27 -04:00
Max Brunsfeld
54421b11f3 wip 2023-05-25 14:10:27 -04:00
Kirill Bulatov
e2ff829f98 Use Transaction instead of ProjectTransaction
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-25 16:12:14 +03:00
Kirill Bulatov
aa58d0fd77 Do not send edits over the wire 2023-05-25 12:55:44 +03:00
Kirill Bulatov
eca6d2b597 Process remote format typing also 2023-05-25 09:45:50 +03:00
Kirill Bulatov
58a56bdda2 Always use server formatting settings 2023-05-25 09:45:50 +03:00
Kirill Bulatov
b9dabb165e Use formatting options 2023-05-25 09:45:50 +03:00
Kirill Bulatov
3327e8a6dd Support remote sessions 2023-05-25 09:45:50 +03:00
Kirill Bulatov
f6d7b3d2e8 Send and handle OnTypeFormatting LSP request 2023-05-25 09:45:50 +03:00
Mikayla Maki
51d94f532b
Load diff base for buffers that are opening but not yet opened when repositories are discovered 2023-05-22 18:26:33 -07:00
Mikayla Maki
4c9d24da7c
Only fire update diff base when the dot repo is scanned (#2510)
This PR fixes a bug in the firing of the UpdatedRepositories event which
caused it to flood collaboration with new messages on every file save.

Release Notes:

* Fixed a bug in repository detection that caused it to fire
over-eagerly (preview only)
2023-05-22 14:11:19 -07:00
Mikayla Maki
96224fa7e8
Only fire update diff base when the dot repo is scanned 2023-05-22 13:57:07 -07:00
Max Brunsfeld
7689cdf3f9 Clear old diagnostics when restarting a language server 2023-05-22 12:53:22 -07:00
Max Brunsfeld
e129ed2d91
Fix spurious setting error log messages (#2498)
Fixes a bug introduced in
https://github.com/zed-industries/zed/pull/2448, where error messages
would be logged if the user config didn't specify certain fields like
`journal` or `telemetry`.
2023-05-22 11:44:21 -07:00
Mikayla Maki
bbb68c523c
Refactored apart the forward and the backwards iterator for diff hunks 2023-05-19 18:09:47 -07:00
Max Brunsfeld
e32233c826 Fix spurious setting error logs on non-existent setting keys 2023-05-19 17:15:05 -07:00
Mikayla Maki
43e301eeef
refine batched anchor conversions
co-authored-by: max <max@zed.dev>
2023-05-19 16:52:57 -07:00
Max Brunsfeld
fb11c3e4bf Remove stray prints 2023-05-19 16:52:30 -07:00
Mikayla Maki
1474429271
fmt 2023-05-19 16:32:07 -07:00
Mikayla Maki
c795c9b844
Rearrange git tests in worktree
Add support for renaming work directories
2023-05-19 16:30:00 -07:00
Max Brunsfeld
7ae642b9b8 Avoid storing removed_entry_ids on the LocalSnapshot 2023-05-19 15:16:04 -07:00
Max Brunsfeld
32c7157906 🎨 Make worktree repositories more consistent 2023-05-19 15:04:37 -07:00
Max Brunsfeld
6359333749 Don't store next_entry_id on worktree's local snapshot 2023-05-19 13:49:24 -07:00
Kirill Bulatov
7d1833b759
When the file is deleted via project panel, close it in editors (#2490)
Deals with https://github.com/zed-industries/community/issues/179 by
sending a message about it, to asynchronously apply on all workspaces.

Release Notes:

* Fixes a bug when files, deleted in the project panel were left open in
the editor
2023-05-19 21:51:37 +03:00
Max Brunsfeld
844b8d9e1e
Remove unnescessary double lookup in repo for (#2492)
Release Notes:

* Optimize repository queries (preview only)
2023-05-19 11:47:05 -07:00
Mikayla Maki
9f157bdb67
Remove unescessary methods 2023-05-19 11:30:10 -07:00
Max Brunsfeld
729a93db6b Optimize retrieving repos for entries when rendering the project panel
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-05-19 11:29:02 -07:00
Mikayla Maki
6792788216
Remove unnescessary double lookup 2023-05-19 11:08:58 -07:00
Max Brunsfeld
d480555ec9
Fix performance problems in reporting changed FS paths to language servers (#2491)
Fixes
https://linear.app/zed-industries/issue/Z-1611/main-thread-hangs-while-sending-filesystem-change-events-to-lsp

Release Notes:

* Fixed a lag that would sometime occur when large numbers of files
changed on disk, due to reporting the changed files to language servers.
2023-05-19 09:42:55 -07:00
Max Brunsfeld
459cc9c959 Optimize matching of multiple file-watch globs using the globset crate 2023-05-19 09:13:34 -07:00
Kirill Bulatov
583b15badc When the file is deleted via project panel, close it in editors 2023-05-19 18:52:30 +03:00
Kirill Bulatov
3984cc6d39 Properly handle WorktreeId 2023-05-19 12:37:36 +03:00
Max Brunsfeld
4bda5c4d69 Optimize LSP watched file reporting in 2 simple ways
* Convert globs to relative paths in advance. This avoids needing to convert
  every changed path to an absolute path before performing glob matching.
* Avoid duplicate reporting for language servers with multiple worktrees.
2023-05-18 17:08:51 -07:00
Kirill Bulatov
201d513c50 Show navigation history in the file finder modal
co-authored-by: Max <max@zed.dev>
2023-05-18 21:50:38 +03:00
Kirill Bulatov
711d2c6fe7 Maintain recently opened files history 2023-05-18 21:50:38 +03:00
Max Brunsfeld
258723566f Rename settings::register_setting -> settings::register 2023-05-17 15:06:11 -07:00
Max Brunsfeld
2d5f03e148 Remove optional path argument when getting settings 2023-05-17 15:05:20 -07:00
Max Brunsfeld
67a25126d4 Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Max Brunsfeld
89204e85c0 Merge branch 'main' into setting-store 2023-05-17 09:55:24 -07:00
Max Brunsfeld
cbd4771f10 Define project settings in project crate 2023-05-16 17:45:04 -07:00
Max Brunsfeld
39618ae32d Define language settings in the language crate 2023-05-16 17:29:53 -07:00
Julia
8b63caa0bd Fix worktree refresh request causing gitignore to not update
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-16 13:01:29 -04:00
Julia
f50240181a Avoid removing fake fs entry when rename fails later in the process
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-16 13:00:39 -04:00
Mikayla Maki
e4d509adf4
fmt 2023-05-15 16:22:52 -07:00
Mikayla Maki
4d40aa5d6f
Restore trickle up git status to folder
co-authored-by: max <max@zed.dev>
2023-05-15 16:22:00 -07:00
Mikayla Maki
68078853b7
Made status tracking resilient to folder renames
co-authored-by: max <max@zed.dev>
2023-05-15 16:21:58 -07:00
Mikayla Maki
307dd2b83e
Update proto names to reflect new status info 2023-05-15 16:20:01 -07:00