Antonio Scandurra
89ead1c44d
Merge pull request #314 from zed-industries/auto-connect
...
Auto-connect to server on startup if credentials are on the keychain
2022-01-11 18:34:20 +01:00
Antonio Scandurra
c16820166b
Fix cursor position when inserting newlines on a repeated excerpt
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-11 18:30:25 +01:00
Antonio Scandurra
aa543a4b0a
Ensure selections stay sorted after refreshing them
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-11 17:16:45 +01:00
Antonio Scandurra
e70b728758
Verify Anchor::buffer_id
before resolving it or comparing it
...
This commit also verifies some properties about anchor resolution in the
multibuffer randomized test.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-11 16:40:12 +01:00
Antonio Scandurra
d7fcb049d4
Don't register an entity ID extractor for non-entity subscriptions
...
This commit fixes a panic that could occur when registering N subscriptions for
N entities of the same kind. Before, when dropping the first of the
subscriptions, we would remove the entity ID extractor as well. This was,
however, used by all the other N - 1 subscriptions which would then start
losing messages. In addition, dropping yet another subscription of that kind
would result in a panic, because we wouldn't find the extractor in the map
upon invoking `Subscription::drop`.
With this change we will avoid removing the ID extractor when dropping a
subscription. Crucially, we also avoid inserting extractors for simple message
subscriptions. This enables these non-entity subscriptions to be dropped and
re-registered without seeing a "registered handler for the same message twice"
panic.
2022-01-11 08:21:35 +01:00
Max Brunsfeld
a0a558318c
In diagnostics editor, attempt to open excerpts in a different pane
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-10 16:33:25 -08:00
Max Brunsfeld
747d9e8784
Add files to project diagnostics view in order
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-10 16:17:56 -08:00
Max Brunsfeld
c7eb6a6a60
Tweak color of share icon in titlebar
2022-01-10 11:26:07 -08:00
Max Brunsfeld
7244fe9c7f
Merge pull request #315 from zed-industries/fix-outdent-column-0
...
Fix outdent not working when cursor is at column 0
2022-01-10 11:16:30 -08:00
Antonio Scandurra
4992a8a407
🎨
2022-01-10 16:10:29 +01:00
Antonio Scandurra
b44ae46559
Fix panic if subscribing after dropping a subscription for the same message
2022-01-10 16:09:06 +01:00
Antonio Scandurra
dff812b38e
Don't panic when dropping a subscription in a subscription handler
2022-01-10 16:04:49 +01:00
Antonio Scandurra
9f6c53b547
Fix dev dependencies in client/Cargo.toml
2022-01-10 16:03:55 +01:00
Antonio Scandurra
b1de9a945d
Fix outdent not working when cursor is at column 0
2022-01-10 15:32:28 +01:00
Antonio Scandurra
e8bbd370e4
Auto-connect to server on startup if credentials are on the keychain
2022-01-10 15:06:38 +01:00
Antonio Scandurra
5c3ae8808b
Fix diagnostic unit test assertions
2022-01-10 14:28:25 +01:00
Antonio Scandurra
eb353648e6
🎨
2022-01-10 12:14:52 +01:00
Antonio Scandurra
a1597578ff
Compare singleton buffers in test_open_and_save_new_file
2022-01-10 11:56:00 +01:00
Antonio Scandurra
0742640b39
Correctly report line boundaries when a map contains both folds and wraps
...
This fixes the randomized test failures that were occurring on main.
2022-01-10 11:26:48 +01:00
Antonio Scandurra
1a53d5b7ba
Use a new Workspace::activate_item
API in project diagnostics
...
Previously, we would only activate the pane without switching the
pane's *active item*.
2022-01-10 10:10:11 +01:00
Max Brunsfeld
f933d54469
When selections lose their excerpts, move them to the next primary diagnostic
2022-01-07 14:53:33 -08:00
Max Brunsfeld
ce6f3d7f3e
Reuse views when moving between diagnostic view and editors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 11:00:12 -08:00
Max Brunsfeld
ea263822fa
Finish implementing ProjectDiagnostics::open_excerpts
...
* Build workspace item views with a reference to the workspace
* Add randomized test for MultiBuffer::excerpted_buffers and fix a small bug
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 09:59:27 -08:00
Antonio Scandurra
e5c520a265
Use Buffer
handles instead of MultiBuffer
as editor workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 17:48:31 +01:00
Antonio Scandurra
794d214eee
Refactor opening workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 17:38:37 +01:00
Antonio Scandurra
3cab32d201
WIP: Add keybinding to open buffers under cursors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 16:12:50 +01:00
Antonio Scandurra
cf62d26ed8
Display a "Checking..." message when running disk-based diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 15:03:19 +01:00
Antonio Scandurra
e39be35e17
Show status bar item for project diagnostic summary
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 14:14:21 +01:00
Antonio Scandurra
56496c2585
Move back diagnostic_summaries
into Worktree
...
This fixes an issue where updating the snapshot's entries would
override the diagnostic summaries received on the remote side.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 13:38:20 +01:00
Antonio Scandurra
089542c6f4
Avoid removing diagnostics from Worktree
after opening a buffer
...
This allows re-opening the same buffer and supplying the previous
diagnostics.
2022-01-07 10:33:21 +01:00
Antonio Scandurra
67f672d0cc
Clear selections on other excerpted buffers when setting active selections
2022-01-07 10:19:28 +01:00
Max Brunsfeld
94e9c7fd5b
Give a full-width background to the diagnostic headers
2022-01-06 17:55:56 -08:00
Max Brunsfeld
2b36ab0de7
Introduce Expanded element
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 17:35:45 -08:00
Max Brunsfeld
1f762e482d
Unify Flexible and Expanded elements
...
We'll use the name Expanded for something else now.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 17:29:34 -08:00
Max Brunsfeld
b19d92e918
Keep selections at the top of the project diagnostics view when it is first populated
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 17:01:13 -08:00
Max Brunsfeld
9bbe67f0ea
Don't clobber diagnostics when getting new snapshot from background scanner
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 15:04:06 -08:00
Max Brunsfeld
7357b3ff2a
Revert "Remove special handling of multi-line primary diagnostic messages and fix tests"
...
This reverts commit ce4142eab3
.
2022-01-06 14:38:13 -08:00
Max Brunsfeld
10548c2038
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
943571af2a
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
2dbee1d914
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
d7a78e14ac
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
571d0386e2
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
1875a0e349
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
d0f7e5f075
Maintain excerpt ordering correctly when some errors don't change
2022-01-06 15:33:02 +01:00
Antonio Scandurra
f37f839330
Wire up refresh_anchors
in Editor::refresh_selections
and call it
2022-01-06 15:32:37 +01:00
Max Brunsfeld
7340e83059
WIP - MultiBuffer::refresh_anchors
2022-01-05 21:12:49 -08:00
Max Brunsfeld
fee7657fd7
Merge branch 'main' into polish-project-diagnostics
2022-01-05 20:38:20 -08:00
Max Brunsfeld
f9f75e98f8
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
e5faaeb2f2
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
5a53eeef63
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
85a13fa477
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
8728d3292d
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
29b63ae4c6
Remove invalid excerpts as opposed to styling them differently
2022-01-05 18:21:17 +01:00
Antonio Scandurra
fe28abe8cf
Show a message when no diagnostics are available
2022-01-05 17:25:03 +01:00
Antonio Scandurra
e56609cf0c
Ensure prior, deferred selections don't override newer selections
2022-01-05 15:43:26 +01:00
Antonio Scandurra
eb65a5d29a
Fix TreeMap::get
always returning None
2022-01-05 15:41:30 +01:00
Antonio Scandurra
f8c2620166
Fix Buffer::remote_selections_in_range
at query range boundaries
2022-01-05 15:04:50 +01:00
Antonio Scandurra
587a908225
Populate deferred operations when an operation can't be applied
2022-01-05 15:04:19 +01:00
Antonio Scandurra
bf044506ed
Verify that selections are replicated correctly in randomized test
2022-01-05 15:04:08 +01:00
Antonio Scandurra
870fa5f278
Serialize deferred operations
2022-01-05 11:52:41 +01:00
Antonio Scandurra
d383ff30ce
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
7bc8eb4f3d
Fix compile errors and get serialization unit test passing
2022-01-05 10:29:29 +01:00
Max Brunsfeld
984e366c32
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
0bcd0a3f08
Forward events from remote worktrees to their projects
2022-01-04 16:01:25 -08:00
Max Brunsfeld
d7ecbdcc1d
Add unit test showing problem with serialization of undo ops
2022-01-04 16:01:12 -08:00
Max Brunsfeld
d8b888c9cb
Replicate diagnostic summaries
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-04 14:29:22 -08:00
Antonio Scandurra
b2f0c78924
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
5d45c5711d
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
b3b56c36d0
Release v0.11.0
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-04 18:27:35 +01:00
Antonio Scandurra
ad1db117e6
Re-enable cargo check for rust-analyzer
2022-01-04 18:26:16 +01:00
Antonio Scandurra
508b9dc024
Rip out "diagnostic providers"
2022-01-04 16:32:17 +01:00
Antonio Scandurra
496066db59
Run Project::diagnose
when registering a new language on Worktree
2022-01-04 15:17:37 +01:00
Antonio Scandurra
2b31a48ef9
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
ed361f2d1a
Position selections correctly when duplicating lines in a multi-buffer
2022-01-04 15:17:37 +01:00
Antonio Scandurra
8dc9197324
Position cursors correctly in Editor::delete_line
in a multi-buffer
2022-01-04 15:17:37 +01:00
Antonio Scandurra
05a6137549
Capture a new buffer snapshot for excerpts whose selections got updated
2022-01-04 12:22:51 +01:00
Max Brunsfeld
a4027aacb5
Introduce a WorktreeId struct, fix incorrect use of remote worktrees' handle id
2022-01-04 11:28:44 +01:00
Max Brunsfeld
7f8e76e0f1
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
Max Brunsfeld
a080ae98c6
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
f499a1dfc2
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
6d6a82655a
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
ba75007259
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
984378e12c
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
Nathan Sobo
7c9e4e513c
Provide an accurate panic message when translating points off the end of a line
...
Maybe we should fail more gracefully in this case, but I think we should at least make the message accurate and see how we do.
2021-12-29 23:11:54 -08:00
Max Brunsfeld
137fbd0088
Update editor element to use new {next,prev}_line_boundary
methods
...
Since these methods take buffer points instead of display points, this adjusts
the logic for retrieving the visible selections, so that they are initially returned
in terms of buffer points.
2021-12-28 13:47:09 -08:00
Nathan Sobo
7f786ca8a6
WIP: Start moving toward a simpler interface for detecting prev/next line boundaries
2021-12-27 22:11:05 -08:00
Nathan Sobo
89bbfb8154
wip
2021-12-27 21:14:23 -08:00
Max Brunsfeld
6057d819b0
Add a unit test showing panic in move_line_down
2021-12-27 20:58:01 -08:00
Nathan Sobo
93a516d588
Fix warning
2021-12-27 18:00:15 -08:00
Max Brunsfeld
accf90e843
Add MultiBufferSnapshot::range_contains_excerpt_boundary
...
Use this method to disable move_line_down across excerpt boundaries.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-27 17:08:31 -08:00
Nathan Sobo
cbc162acf5
WIP: Allow lines to be moved down across excerpts
...
This is still a bit weird because we can't remove the last line of an excerpt but we still move it into another buffer. There also seem to be issues with undo.
2021-12-27 15:46:19 -08:00
Nathan Sobo
835af35839
Simplify prev/next_row_boundary methods
...
We added clipping of points against the buffer when excerpt headers were in the buffer, but now that they're just blocks, I think we can avoid the potential to panic in these methods by going back to not clipping.
2021-12-27 15:46:19 -08:00
Max Brunsfeld
3040cfece1
Fix Editor::newest_selection
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-27 15:42:37 -08:00
Max Brunsfeld
f5d4e26799
Remove unused context variable
2021-12-27 15:34:07 -08:00
Max Brunsfeld
cbd9e186b5
Store selections with a right start bias so that autoindent moves them
...
Previously, cursors at column 0 had to be explicitly moved when those lines
were autoindented. This behavior was lost when we moved selections from
the buffer to the editor. Now, with the right bias, we get this behavior automatically.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-27 15:33:57 -08:00
Max Brunsfeld
43db9e826b
Clear autoindent requests when applying autoindent
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-27 13:33:48 -08:00
Nathan Sobo
13ed9dc1f1
Document database setup and fix issue in script/seed-db
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-27 12:52:15 -08:00
Nathan Sobo
63238a2938
Destroy access tokens before destroying users and word-smith method names
2021-12-25 17:46:02 -07:00
Nathan Sobo
b949b30f24
Add delete user endpoint
2021-12-25 11:57:37 -07:00
Nathan Sobo
56930972fe
Add endpoints for listing, creating, and updating users
2021-12-25 11:55:10 -07:00
Nathan Sobo
fe5465a265
Enable authentication via the NextJS site
2021-12-25 11:55:10 -07:00
Nathan Sobo
e9a750be71
Don't merge keymap contexts from containing elements
...
Co-Authored-By: Aaron Hillegass <charmedliferaft@gmail.com>
2021-12-24 16:44:35 -07:00
Nathan Sobo
9fc2ddb8da
Merge pull request #293 from zed-industries/project-diagnostics
...
Project diagnostics: First pass
2021-12-24 16:42:00 -07:00
Nathan Sobo
cf81f5a555
Update tests to reflect that we no longer attempt to recycle group ids
2021-12-24 16:36:21 -07:00
Nathan Sobo
ce4142eab3
Remove special handling of multi-line primary diagnostic messages and fix tests
2021-12-24 13:47:45 -07:00
Nathan Sobo
a3df597155
Make diagnostics disk-based in test
2021-12-24 13:33:11 -07:00
Antonio Scandurra
adeea9da66
Parse children
from cargo check
output to provide hints
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-24 17:06:18 +01:00
Antonio Scandurra
a85e400b35
Start on a DiagnosticProvider
implementation for Rust
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-24 16:22:22 +01:00
Antonio Scandurra
393009a05c
Implement Buffer::diagnostic_group
2021-12-24 12:08:55 +01:00
Antonio Scandurra
11e3874b4a
Remove duplication when assigning diagnostics and hardcode provider names
2021-12-24 12:07:26 +01:00
Antonio Scandurra
3149a4297c
Add API_TOKEN
environment variable to manifest
2021-12-24 10:02:24 +01:00
Max Brunsfeld
4f774e2bde
wip
2021-12-23 23:10:28 -08:00
Nate Butler
78564dcc68
Add job post to Zed.dev
2021-12-23 23:22:57 -05:00
Max Brunsfeld
d5a17053df
Get code compiling with some todos
2021-12-23 14:21:10 -08:00
Nathan Sobo
e3ecd87081
WIP
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-23 11:24:35 -07:00
Antonio Scandurra
7b453beebc
WIP: Use cargo check
for on-disk diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-12-23 18:35:50 +01:00
Antonio Scandurra
b9d1ca4341
Show only disk-based diagnostics in ProjectDiagnosticsEditor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-23 16:47:54 +01:00
Antonio Scandurra
304afc1813
Only preserve excerpts for invalid diagnostics if they contain cursors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-23 16:33:50 +01:00
Antonio Scandurra
dcf26acaac
Use a different invalidation strategy for project-wide diagnostics
2021-12-23 15:41:43 +01:00
Antonio Scandurra
da460edb8b
Remove BufferState when the last buffer's excerpt is removed
2021-12-23 09:59:39 +01:00
Antonio Scandurra
9164c5f239
Emit an UpdateDiagnostics
from Worktree when buffer diagnostics change
2021-12-23 09:57:50 +01:00
Max Brunsfeld
c47340000d
Fix remove_excerpts when removing the last N excerpts, N > 1
...
Also, generalize the randomized test to remove multiple excerpts at a time
2021-12-22 21:02:20 -08:00
Max Brunsfeld
3e59c61a34
Use MultiBuffer::insert_excerpt_after to update project diagnostics view
2021-12-22 18:00:53 -08:00
Max Brunsfeld
435d405d10
Implement MultiBuffer::insert_excerpt_after
2021-12-22 17:59:44 -08:00
Max Brunsfeld
a86ba57983
Add Editor::remove_blocks
2021-12-22 17:30:14 -08:00
Max Brunsfeld
5d8ed535be
Clear out old disk-based diagnostics after 2 seconds
2021-12-22 15:51:51 -08:00
Max Brunsfeld
b9551ae8b1
Preserve group ids when updating diagnostics
2021-12-22 14:50:51 -08:00
Max Brunsfeld
06d2cdc20d
Remove unused multi_buffer::FromAnchor trait
2021-12-22 13:27:43 -08:00
Max Brunsfeld
0faf5308ac
Add a unit test for preserving disk-based diagnostics
2021-12-22 13:27:43 -08:00
Max Brunsfeld
1544da887e
Start work on preserving continuity of disk-based diagnostics
2021-12-22 12:52:50 -08:00
Max Brunsfeld
e31205c95e
Revert "Implement MultiBuffer::remove_excerpts
by inserting tombstones"
...
This reverts commit 275b7e8d4f
.
2021-12-22 10:18:33 -08:00
Antonio Scandurra
275b7e8d4f
Implement MultiBuffer::remove_excerpts
by inserting tombstones
...
This will make it easier to use anchors in the presence of deletes.
2021-12-22 17:57:36 +01:00
Max Brunsfeld
2c3efdea8c
WIP - Start work on updating project diagnostics view
2021-12-21 16:39:23 -08:00
Max Brunsfeld
a888620e5f
Implement MultiBuffer::remove_excerpts
...
We'll need this for updating project diagnostics
2021-12-21 15:25:57 -08:00
Max Brunsfeld
a93f5e5fb4
Avoid repeated subscriptions + clones when adding another excerpt for same buffer
2021-12-21 14:28:23 -08:00
Max Brunsfeld
3c26f67ea3
Minor cleanup in Buffer::update_diagnostics
2021-12-21 14:07:50 -08:00
Max Brunsfeld
bc906fef9c
Store worktree's diagnostics summaries ordered by path
2021-12-21 14:07:09 -08:00
Max Brunsfeld
699dafbbd4
Avoid cloning diagnostic messages from language server
2021-12-21 14:06:17 -08:00
Max Brunsfeld
8492c6e7ac
Fix maintenance of MultiBuffer's buffer states
2021-12-21 13:07:43 -08:00
Max Brunsfeld
13ecd16685
Index max buffer row on MultiBuffer
2021-12-21 12:36:46 -08:00
Nathan Sobo
61b806e485
Add an endpoint for creating an access token for a GitHub login
2021-12-21 13:05:32 -07:00
Max Brunsfeld
04d577e326
Fix context line handline in project diagnostic view
2021-12-21 11:46:47 -08:00
Max Brunsfeld
60f7169008
Remove header heights from multibuffer randomized test
2021-12-21 10:24:01 -08:00
Antonio Scandurra
eec1748dc7
Render excerpt headers using DisplayMap::insert_blocks
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-12-21 18:32:27 +01:00
Antonio Scandurra
91c786a8db
WIP: Insert blocks in BlockMap
for MultiBuffer
headers
2021-12-21 17:38:03 +01:00
Antonio Scandurra
8534a9cc41
Don't insert headers in MultiBuffer
...
This lays the groundwork to insert headers in the block map instead.
2021-12-21 16:38:18 +01:00
Antonio Scandurra
99317bbd62
Delete unit test
...
Sharing/unsharing is already exercised via the integration tests.
2021-12-21 14:51:09 +01:00
Antonio Scandurra
89c0b358a7
Allow sharing/unsharing of projects
2021-12-21 12:45:20 +01:00
Antonio Scandurra
17094ec542
Allow opening of remote projects via the contacts panel
2021-12-21 12:05:38 +01:00
Antonio Scandurra
5d2c4807db
Fix invalid theme variables
2021-12-21 10:25:37 +01:00
Antonio Scandurra
c6dd797f4e
Drop project instead of worktree to simulate client leaving
2021-12-21 10:20:05 +01:00
Antonio Scandurra
afec4152f4
Update contacts as projects/worktrees get registered/unregistered
2021-12-21 10:17:26 +01:00
Antonio Scandurra
40da3b233f
Get more integration tests passing
2021-12-21 09:50:11 +01:00
Antonio Scandurra
1e8ef8a4c1
Register local worktrees after acquiring a project remote id
2021-12-21 09:49:13 +01:00
Antonio Scandurra
4053d683d9
Re-enable commented out worktree test
2021-12-21 08:35:08 +01:00
Max Brunsfeld
788bb4a368
Get some RPC integration tests passing
2021-12-20 18:08:53 -08:00
Max Brunsfeld
636931373e
Add missing RPC handlers for local projects
2021-12-20 18:08:06 -08:00
Max Brunsfeld
870b73aa36
Send a LeaveProject message when dropping a remote project
2021-12-20 18:07:51 -08:00
Max Brunsfeld
a138955943
Fix logic for waiting for project's remote id
2021-12-20 18:07:34 -08:00
Max Brunsfeld
5d8d7de68d
Fix accidental usages of local worktree id instead of remote id
2021-12-20 18:06:58 -08:00
Max Brunsfeld
55910c0d79
Get the server and integration tests compiling
2021-12-20 16:30:29 -08:00
Max Brunsfeld
466a377e1d
Merge branch 'main' into share-project
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-20 11:42:59 -08:00
Max Brunsfeld
614ee4eac7
Send worktree info only when sharing worktree
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-20 11:36:59 -08:00
Antonio Scandurra
697e641e8e
Get back to a compiling state for client
...
This temporarily disables some tests and there are still some server-side
compiler errors.
2021-12-20 16:08:34 +01:00
Nathan Sobo
323e1f7367
Add the fetching of user JSON by github login with a token header
2021-12-19 09:43:13 -07:00
Nathan Sobo
f4b9772ec2
Relocate admin routes to make room for API
...
I want to use the top-level /users route for the API that we'll access from the front-end site running on Vercel, and this is the easiest way to make space. Eventually we won't have admin pages, but I want to be additive for now.
2021-12-19 09:06:57 -07:00
Nathan Sobo
29bc2db6e8
Fix journal format strings
2021-12-18 12:15:07 -07:00
Nathan Sobo
0a37d40fad
Pad single-digit months, days, and minutes with a leading zero
2021-12-18 11:11:04 -07:00
Nathan Sobo
ab5db0bc1e
Fix warnings and tests
2021-12-18 11:06:07 -07:00
Nathan Sobo
e4f18947de
Insert a time heading when creating a journal entry
2021-12-18 10:38:54 -07:00
Nathan Sobo
9e8ef31452
Return item handles when opening items
...
This will support interacting with the opened item. Although I think I should probably return the ItemView rather than the Item. Next commit.
2021-12-18 08:26:57 -07:00
Nathan Sobo
ca0d7e5e1f
Add journal crate and move supporting logic into workspace crate
...
I needed to interact with the workspace to open a file from the journal crate, so I moved a bunch of logic out of main related to opening new workspaces and paths.
2021-12-18 08:12:59 -07:00
Nathan Sobo
cd65031cda
Halt keystroke dispatch immediately when we call a global action handler
...
Someday, we may want to define a global action context that allows us to propagate the action, but this isn't currently supported. Previous to this commit, we were invoking the same global action handler multiple times, once for each view in the responder chain.
2021-12-18 08:12:08 -07:00
Max Brunsfeld
c41b958829
WIP - start restructuring collaboration around entire projects
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-17 22:00:39 -08:00
Antonio Scandurra
88d663a253
Allow saving of all buffers contained in project diagnostics editor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-17 16:48:16 +01:00
Antonio Scandurra
f0fe346e15
Gracefully degrade diagnostics_in_range
, diagnostic_group
and file
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-17 16:37:12 +01:00
Antonio Scandurra
6685d5aa7d
Implement MultiBuffer::save
...
This is still not integrated with `workspace::ItemView`.
2021-12-17 16:11:18 +01:00
Antonio Scandurra
7d2b74a93b
Implement MultiBuffer::{is_dirty,has_conflict}
2021-12-17 15:33:09 +01:00
Antonio Scandurra
5f819b6edc
Implement MultiBuffer::enclosing_bracket_ranges
2021-12-17 15:05:05 +01:00
Antonio Scandurra
c9cbc2fe1e
Implement MultiBuffer::range_for_syntax_ancestor
2021-12-17 14:57:42 +01:00
Antonio Scandurra
a2ee38f37b
Make MultiBuffer::is_parsing
a test-only method
2021-12-17 14:57:24 +01:00
Antonio Scandurra
3914d1d072
Display filename on the first excerpt's header for a group
2021-12-17 13:49:21 +01:00
Antonio Scandurra
63f171200e
Enhance diagnostic unit test and correctly display primary diagnostic
...
That is, if the diagnostic has more than one line we will display the
first line in the header and all the other message lines at the error
location.
2021-12-17 12:16:09 +01:00
Max Brunsfeld
528d64d3cc
WIP - Improve project diagnostic context rendering
2021-12-16 18:34:29 -08:00
Max Brunsfeld
fb492a9fb8
Correctly incorporate editor settings into diagnostic header rendering
2021-12-16 16:36:33 -08:00
Max Brunsfeld
ae147a379d
Don't terminate on an empty input chunk in ExcerptChunks
2021-12-16 16:05:28 -08:00
Max Brunsfeld
31eeffa5a7
Autoscroll after inserting blocks
2021-12-16 14:20:01 -08:00
Max Brunsfeld
9cd4e5ba04
Transfer focus from ProjectDiagnostics view to its editor
2021-12-16 14:14:22 -08:00
Max Brunsfeld
6444fcd442
Integrate MultiBuffer::buffer_rows into the display map
2021-12-16 13:53:32 -08:00
Max Brunsfeld
db33e4935a
Implement MultiBuffer::buffer_rows
2021-12-16 12:17:47 -08:00
Max Brunsfeld
a293e9c0c5
Suppress unused field warnings
2021-12-16 11:17:06 -08:00
Max Brunsfeld
38df091b06
Fix up/down movement across excerpt headers
...
Implement these movements in terms of clipping, instead of with explicit loops
2021-12-16 11:16:48 -08:00
Max Brunsfeld
dcd05ef96b
Resolve Anchor::min and ::max to valid positions
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-12-16 10:25:09 -08:00
Max Brunsfeld
80f3173fbd
Always panic if invalid point is passed to {prev,next}_row_boundary
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2021-12-16 10:23:45 -08:00
Antonio Scandurra
0fc2db6d6e
Account for folds when inserting/removing block decorations
2021-12-16 16:44:15 +01:00
Antonio Scandurra
7660159164
Test blocks in display map randomized tests
...
This highlighted some errors in the implementation.
2021-12-16 16:15:14 +01:00
Antonio Scandurra
de679cae78
Re-enable creating multiple blocks at once in BlockMap
tests
2021-12-16 12:41:48 +01:00
Antonio Scandurra
abf96e6ad6
Fix movement tests in DisplayMap
2021-12-16 12:36:27 +01:00
Antonio Scandurra
64e2f6d506
Ensure BlockMap::clip_point
always yield a valid buffer location
2021-12-16 12:29:37 +01:00
Antonio Scandurra
ec39c9d335
Allow specifying MAX_EXCERPTS
via an env variable in random tests
2021-12-16 12:28:54 +01:00