Commit graph

2439 commits

Author SHA1 Message Date
Nathan Sobo
a6dd9a20d4
Fix binding to dump element JSON 2022-01-11 17:52:26 -07:00
Max Brunsfeld
9602bc6f8e Remove stray dbg! calls 2022-01-11 13:56:07 -08:00
Max Brunsfeld
5941f5fca0 Upgrade tree-sitter-markdown 2022-01-11 10:36:31 -08:00
Max Brunsfeld
5a889b04df
Merge pull request #329 from zed-industries/fix-newline-in-multibuffer
Fix cursor position when inserting newlines on a repeated excerpt
2022-01-11 09:39:05 -08:00
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
58e45dd9be
Merge pull request #328 from zed-industries/fix-multibuffer-anchors
Randomize test multibuffer anchors and fix resulting issues
2022-01-11 17:42:53 +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
2d5e72251e
Merge pull request #325 from zed-industries/fix-more-subscription-panics
Don't register an entity ID extractor for non-entity subscriptions
2022-01-11 15:29:23 +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
2ea78c5ade
Merge pull request #320 from zed-industries/more-diagnostics-polish
Keep the cursor at the top when first opening the project diagnostics view
2022-01-10 16:43:20 -08: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
Max Brunsfeld
8ee106e6aa
Merge pull request #316 from zed-industries/fix-subscription-panic
Fix `rpc::Client` subscription panics
2022-01-10 11:15:17 -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
8d7bb8b1a3
Merge pull request #313 from zed-industries/polish-project-diagnostics
Polish project diagnostics UX
2022-01-10 14:33:26 +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