Commit Graph
2405 Commits
Author SHA1 Message Date
Max BrunsfeldandNathan Sobo 024ffdeafe Show error+warning counts in project diagnostics tab
Allow workspace items' tab contents to be arbitrary elements

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 10:51:28 -08:00
Max BrunsfeldandNathan Sobo 5a0ebbfd08 Ensure path headers appear before first diagnostic header
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 10:51:28 -08:00
Max Brunsfeld 7f3c046cda Adjust project diagnostics test to reflect new block structure 2022-01-12 10:51:08 -08:00
Max Brunsfeld 8442bdb3ab Tweak theming of project diagnostics 2022-01-12 10:51:08 -08:00
Max Brunsfeld e21914a059 Deduplicate path names in the project diagnostics view 2022-01-12 10:51:08 -08:00
Max Brunsfeld 291cad9da7 Expand block decorations' bounds to include the gutter 2022-01-12 10:51:08 -08:00
Nathan Sobo 8c8d8a09ce Merge pull request #336 from zed-industries/format-on-save
Format on save
2022-01-12 11:48:12 -07:00
4fa7d61bb0 Test ordering of responses with respect to uni-directional messages
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-12 11:19:17 -07:00
Antonio ScandurraandMax Brunsfeld f29c286a1b Fix failing tests
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-12 18:43:23 +01:00
9a81215e58 Preserve the order of responses with respect to all other incoming messages
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-12 18:26:00 +01:00
Antonio ScandurraandNathan Sobo f31deedac3 Use synchronous locks for Peer state
We hold these locks for a short amount of time anyway, and using an
async lock could cause parallel sends to happen in an order different
than the order in which `send`/`request` was called.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 18:02:41 +01:00
Antonio ScandurraandNathan Sobo f883ffb4f2 Implement Buffer::format
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 18:01:20 +01:00
Antonio Scandurra c7f99c1788 Merge pull request #335 from zed-industries/fix-refresh-selections
Fix panic in `Editor::refresh_selections` due to calling `summaries_for_anchors` without sorting the anchors
2022-01-12 10:03:33 +01:00
Antonio Scandurra 8b13462bce Process selection anchors in a sorted fashion when refreshing them 2022-01-12 09:28:09 +01:00
Antonio Scandurra 9ea4ed245f Add unit test reproducing a panic when refreshing selections 2022-01-12 09:27:03 +01:00
Antonio Scandurra 8fb0ebe389 Don't return a Result in test-only method select_display_ranges 2022-01-12 09:14:48 +01:00
Nathan Sobo 43c0a7f12e Fix binding to dump element JSON 2022-01-11 17:52:26 -07:00
Max Brunsfeld 099f769a12 Remove stray dbg! calls 2022-01-11 13:56:07 -08:00
Max Brunsfeld 5329d3272e Upgrade tree-sitter-markdown 2022-01-11 10:36:31 -08:00
Max Brunsfeld 3bc6f11eda 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 83064671dd 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
a38d391283 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 1c218df4f3 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 ScandurraandNathan Sobo d9a870ee21 Ensure selections stay sorted after refreshing them
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-11 17:16:45 +01:00
Antonio ScandurraandNathan Sobo 848016e6b3 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 c74dd799c2 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 86683a87e2 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 313af4bc8c 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 BrunsfeldandNathan Sobo cefabdaeb9 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 BrunsfeldandNathan Sobo 7887ddc24f 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 224082dd33 Tweak color of share icon in titlebar 2022-01-10 11:26:07 -08:00
Max Brunsfeld 08a6f94c2c 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 db335c29aa 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 12c11fcf8d 🎨 2022-01-10 16:10:29 +01:00
Antonio Scandurra e7c1ba181f Fix panic if subscribing after dropping a subscription for the same message 2022-01-10 16:09:06 +01:00
Antonio Scandurra 35c768fadd Don't panic when dropping a subscription in a subscription handler 2022-01-10 16:04:49 +01:00
Antonio Scandurra 389c472375 Fix dev dependencies in client/Cargo.toml 2022-01-10 16:03:55 +01:00
Antonio Scandurra 83e078ef0b Fix outdent not working when cursor is at column 0 2022-01-10 15:32:28 +01:00
Antonio Scandurra b826ba18ce Auto-connect to server on startup if credentials are on the keychain 2022-01-10 15:06:38 +01:00
Antonio Scandurra 5bd4c5442b Merge pull request #313 from zed-industries/polish-project-diagnostics
Polish project diagnostics UX
2022-01-10 14:33:26 +01:00
Antonio Scandurra ed68da4503 Fix diagnostic unit test assertions 2022-01-10 14:28:25 +01:00
Antonio Scandurra 9d52e4851b 🎨 2022-01-10 12:14:52 +01:00
Antonio Scandurra 9759f2188b Compare singleton buffers in test_open_and_save_new_file 2022-01-10 11:56:00 +01:00
Antonio Scandurra dc0714a27d 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 9521be8224 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 dfab726dd9 When selections lose their excerpts, move them to the next primary diagnostic 2022-01-07 14:53:33 -08:00
Max BrunsfeldandNathan Sobo 4b7584e1a2 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 BrunsfeldandNathan Sobo 4ca8d56b7f 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 ScandurraandNathan Sobo 2877e37001 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 ScandurraandNathan Sobo c28fd392cb Refactor opening workspace items
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 17:38:37 +01:00