Max Brunsfeld
e9b63f06a0
Revert "Remove special handling of multi-line primary diagnostic messages and fix tests"
...
This reverts commit 05c8db05ca .
2022-01-06 14:38:13 -08:00
Max Brunsfeld and Nathan Sobo
dcfa8be99e
Always group diagnostics the way they're grouped in the LSP message
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-06 14:22:28 -08:00
Nathan Sobo and Max Brunsfeld
517a1c6dc2
Report backtraces of pending conditions when deterministic executor illegally parks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-06 13:33:55 -07:00
Nathan Sobo and Max Brunsfeld
df5b181ad8
Send diagnostic summaries to guests when they join the project
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-06 12:12:09 -07:00
Nathan Sobo and Antonio Scandurra
80e5915179
Allow disk-based diagnostic progress begin/end events to interleave
...
When multiple saves occur, we can have multiple start events followed by multiple end events. We don't want to update our project diagnostics view until all pending progress is finished.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-01-06 09:32:08 -07:00
Nathan Sobo and Antonio Scandurra
b12936bc38
Re-focus diagnostics editor when transitioning from an empty to a populated state
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-01-06 08:35:31 -07:00
Antonio Scandurra and Nathan Sobo
a56b3c7fb9
Polish rendering of inline errors
...
- Don't soft-wrap
- Render multiple lines
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-06 16:17:53 +01:00
Antonio Scandurra
e89b1d8354
Maintain excerpt ordering correctly when some errors don't change
2022-01-06 15:33:02 +01:00
Antonio Scandurra
3ec22e7581
Wire up refresh_anchors in Editor::refresh_selections and call it
2022-01-06 15:32:37 +01:00
Max Brunsfeld
f2273252b1
WIP - MultiBuffer::refresh_anchors
2022-01-05 21:12:49 -08:00
Max Brunsfeld
4535c2e99d
Merge branch 'main' into polish-project-diagnostics
2022-01-05 20:38:20 -08:00
Nathan Sobo
9cf539ed3a
Merge pull request #308 from zed-industries/fix-collaboration-regressions
...
Fix collaboration regressions
2022-01-05 19:56:51 -07:00
Max Brunsfeld and Nathan Sobo
4d4dc1b44a
Fix Locator::from_index
...
Enhance language::tests::test_random_collaborators so that it checks buffer invariants.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 17:58:24 -08:00
Max Brunsfeld and Nathan Sobo
75170a078f
Fix Global::gt and rename it to changed_since
...
A false negative return value of `gt` was preventing guests' multibuffers from
syncing correctly.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 17:36:12 -08:00
Max Brunsfeld and Nathan Sobo
2879a402ca
Don't scroll editors away from the top of their buffer when content changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 12:31:00 -08:00
Max Brunsfeld and Nathan Sobo
75ac4f8925
Fix panic when resolving anchors after an excerpt id has been recycled
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 11:28:49 -08:00
Max Brunsfeld
59310ae90d
Merge branch 'main' into polish-project-diagnostics
...
Also fix false failure in ModelHandle::condition when parking is not forbidden.
2022-01-05 10:53:18 -08:00
Antonio Scandurra
386b1d4719
Remove invalid excerpts as opposed to styling them differently
2022-01-05 18:21:17 +01:00
Antonio Scandurra
d92ca16e6f
Merge pull request #306 from zed-industries/serialize-buffer-undos
...
Fix buffer replication bugs that would lead to divergence among replicas
2022-01-05 18:14:09 +01:00
Antonio Scandurra
fbb347523a
Show a message when no diagnostics are available
2022-01-05 17:25:03 +01:00
Antonio Scandurra
0e4147791f
Ensure prior, deferred selections don't override newer selections
2022-01-05 15:43:26 +01:00
Antonio Scandurra
866e9bbc6a
Fix TreeMap::get always returning None
2022-01-05 15:41:30 +01:00
Antonio Scandurra
ecb270f191
Fix Buffer::remote_selections_in_range at query range boundaries
2022-01-05 15:04:50 +01:00
Antonio Scandurra
ce6beabe7a
Populate deferred operations when an operation can't be applied
2022-01-05 15:04:19 +01:00
Antonio Scandurra
2f15acde6f
Verify that selections are replicated correctly in randomized test
2022-01-05 15:04:08 +01:00
Antonio Scandurra
b41cb32d9d
Serialize deferred operations
2022-01-05 11:52:41 +01:00
Antonio Scandurra
1450e009e7
Introduce randomized test for collaboration on buffers
...
This test will exercise serialization of operations as well as peers
replicating from an existing buffer.
2022-01-05 11:51:41 +01:00
Antonio Scandurra
5ca9efceea
Fix compile errors and get serialization unit test passing
2022-01-05 10:29:29 +01:00
Max Brunsfeld
7a5db108f1
WIP - Serialize buffer in terms of its state, not its base text + ops
...
The main reason for this is that we need to include information about
a buffer's UndoMap into its protobuf representation. But it's a bit
complex to correctly incorporate this information into the current
protobuf representation.
If we want to continue reusing `Buffer::apply_remote_edit` for
incorporating the historical operations, we need to either make
that method capable of incorporating already-undone edits, or
serialize the UndoMap into undo *operations*, so that we can apply
these undo operations after the fact when deserializing. But this is
not trivial, because an UndoOperation requires information about
the full offset ranges that were undone.
2022-01-04 18:06:16 -08:00
Max Brunsfeld
14690bddf4
Forward events from remote worktrees to their projects
2022-01-04 16:01:25 -08:00
Max Brunsfeld
f56798cf4c
Add unit test showing problem with serialization of undo ops
2022-01-04 16:01:12 -08:00
Max Brunsfeld and Antonio Scandurra
18c6b21e3c
Replicate diagnostic summaries
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-01-04 14:29:22 -08:00
Antonio Scandurra and Max Brunsfeld
7525741533
Merge branch 'main' into polish-project-diagnostics
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-04 18:35:28 +01:00
Antonio Scandurra
3dbe673038
Merge pull request #303 from zed-industries/project-sharing-fixes
...
Miscellaneous bug fixes after switching to a project-centric sharing model
2022-01-04 18:29:46 +01:00
Antonio Scandurra and Max Brunsfeld
7f3418d5ab
Release v0.11.0
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-04 18:27:35 +01:00
Antonio Scandurra
46c53aa313
Re-enable cargo check for rust-analyzer
2022-01-04 18:26:16 +01:00
Antonio Scandurra
dd5ba61ab6
Rip out "diagnostic providers"
2022-01-04 16:32:17 +01:00
Antonio Scandurra
7ec5e4b558
Run Project::diagnose when registering a new language on Worktree
2022-01-04 15:17:37 +01:00
Antonio Scandurra
c7cdff2c38
Clip right when moving to next word in case we land on a block line
2022-01-04 15:17:37 +01:00
Antonio Scandurra
665f681f3b
Position selections correctly when duplicating lines in a multi-buffer
2022-01-04 15:17:37 +01:00
Antonio Scandurra
5ebd9e625a
Position cursors correctly in Editor::delete_line in a multi-buffer
2022-01-04 15:17:37 +01:00
Antonio Scandurra
9e9eb32e5d
Capture a new buffer snapshot for excerpts whose selections got updated
2022-01-04 12:22:51 +01:00
Max Brunsfeld
f06eef084f
Introduce a WorktreeId struct, fix incorrect use of remote worktrees' handle id
2022-01-04 11:28:44 +01:00
Max Brunsfeld
4dc7129144
Remove worktree-specific methods from language::File trait
...
Use downcasting instead for accessing worktree-specific state of the Files.
This will allow us to introduce a WorktreeId type and use that everywhere
for identifying worktrees. It also just removes some unnecessary coupling
between the language crate and the worktree.
2022-01-04 11:28:44 +01:00
Antonio Scandurra
edb9e3db55
Merge pull request #302 from zed-industries/sign-in-redirect
...
Allow the zed app to connect to both the old and new rpc endpoints
2022-01-04 10:39:28 +01:00
Max Brunsfeld
cd7ae96c44
Allow the zed app to connect to both the old and new rpc endpoints
...
In the case of the new Next.js app, the app will follow a redirect
from 'zed.dev/rpc' to the subdomain where the rust service is hosted.
Until then, the app will connect directly to zed.dev/rpc.
2022-01-03 15:29:26 -08:00
Nathan Sobo
9c0229a2ba
Merge pull request #301 from zed-industries/move-lines-in-multibuffer
...
Support moving lines up and down in multi-buffers
2021-12-30 01:13:31 -08:00
Nathan Sobo
2819bb6ca5
Create blocks with anchors to allow a bias to be specified
...
This allows us to respect the bias on anchors we use to create excerpt headers so that they always remain above any content inserted at the start of an excerpt.
2021-12-30 01:03:19 -08:00
Nathan Sobo
a71f2b3599
Merge pull request #300 from zed-industries/fix-move-line-panic
...
Fix panics when moving lines with block decorations and simplify line boundary detection
2021-12-29 23:47:25 -08:00
Nathan Sobo
5694296526
Use anchors for line movement edits to support multi-buffers
...
Because multi-buffers can contain the same content multiple times, we need to use anchors to track our desired insertion and removal locations when moving lines. This is because deleting a line in order to move it might end up deleting *multiple* lines.
2021-12-29 23:47:03 -08:00