Commit Graph

1867 Commits

Author SHA1 Message Date
Max Brunsfeld
ae9f71cc07 Avoid bailing out of Project::symbols when one LSP request fails 2022-04-11 21:09:01 -07:00
Max Brunsfeld
aa37c364bb
Merge pull request #799 from zed-industries/debug-project-diagnostics-as-json
Allow dumping the project diagnostic view's state as JSON
2022-04-11 20:40:50 -07:00
Max Brunsfeld
949fbe7cd3 Allow dumping the project diagnostic view's state as JSON
Also, improve DebugElements action so that it shows the JSON in an editor.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:51:46 -07:00
Nathan Sobo
d8e4e924cc Merge branch 'main' into collab-renames 2022-04-11 19:07:07 -06:00
Max Brunsfeld
54d49c13d9
Merge pull request #795 from zed-industries/cancel-buffer-search
Handle editor cancel in pane in order to dismiss find toolbar
2022-04-11 17:47:44 -07:00
Max Brunsfeld
a754c3015f
Merge pull request #762 from zed-industries/safer-atlas-allocation
Safer Atlas Allocation
2022-04-11 17:42:53 -07:00
Max Brunsfeld
300feb5d57
Merge pull request #797 from zed-industries/project-search-focus
Focus Project Search query editor always when deployed
2022-04-11 17:41:08 -07:00
Max Brunsfeld
b3c64e47f1
Merge branch 'main' into cancel-buffer-search 2022-04-11 17:38:26 -07:00
Max Brunsfeld
50d5253eff
Merge pull request #792 from zed-industries/fix-tsx-default-indent
Set default tsx tabsize
2022-04-11 17:35:54 -07:00
Keith Simmons
1d8afdff80 Set tsx default indent to 2 and remove js from extension list in tsx config.toml 2022-04-11 17:34:44 -07:00
Nathan Sobo
5a5506ae1d Update certificate 2022-04-11 18:33:55 -06:00
Max Brunsfeld
25e1e3d2df
Merge pull request #786 from zed-industries/load-keymaps
Allow key bindings to be customized via a JSON file
2022-04-11 17:31:22 -07:00
Max Brunsfeld
2807d85a60
Merge pull request #791 from zed-industries/project-search-focus-fix
Properly activate project search item on mouse click
2022-04-11 17:31:06 -07:00
Max Brunsfeld
add0dad6d7 Use '*' to represent the default context in keymap files
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 17:17:03 -07:00
Nathan Sobo
3b852ee2bd Update Kubernetes manifest to refer to "collab" instead of "zed" 2022-04-11 18:15:41 -06:00
Keith Simmons
28da5b4afc Don't focus active editor when deploying project search and focus query editor on project search focus 2022-04-11 17:05:24 -07:00
Max Brunsfeld
ee3eb9658f Use the word 'keymap' more consistently
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 17:02:16 -07:00
Max Brunsfeld
be11f63f1e Watch ~/.zed/bindings.json file for custom key bindings
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 16:50:44 -07:00
Max Brunsfeld
92a5c30389 Merge branch 'main' into load-keymaps 2022-04-11 15:55:10 -07:00
Max Brunsfeld
c065f283aa Move assets to their own crate, load keymaps in vim tests
Also, move assets folder to the top-level.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 15:54:52 -07:00
Max Brunsfeld
e0096ec1eb Move keymap_file module into settings crate
Co-authored-by: Keith Simmons <keith@zed.dev
2022-04-11 15:22:18 -07:00
Keith Simmons
4b295f566a Handle editor cancel in pane in order to dismiss find toolbar 2022-04-11 15:11:23 -07:00
Keith Simmons
0ca4c9946a Add logging when atlas allocator fails to allocate 2022-04-11 10:31:38 -07:00
Antonio Scandurra
3844634765 Hold the state lock while responding to guest joining a project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:30:52 +02:00
Keith Simmons
7abd3a98a8 Make atlas allocation fallable and skip rendering icons and paths when it fails 2022-04-11 10:15:49 -07:00
Keith Simmons
3c116e32cb Reraise editor events in Project Search and activate workspace item from them 2022-04-11 10:13:07 -07:00
Antonio Scandurra
9a8b0388fa Replace synchronous Store lock with an async lock
This also fixes some failures due to `broadcast` and `update_contacts_for_users`
being fallible. As part of this commit, these two functions don't return `Result`
anymore: the reason for this change is that we don't want a request to fail only
because a peer disconnected while we were trying to broadcast a message to them.
2022-04-11 17:56:30 +02:00
Antonio Scandurra
273ee0ae58 Acquire guest connection ids after save request has been forwarded
This fixes a bug that would cause the server to broadcast the save
message to guests that have potentially left the project.
2022-04-11 16:27:14 +02:00
Antonio Scandurra
c3927c541f Simulate random guest disconnection and reconnection 2022-04-11 16:27:11 +02:00
Antonio Scandurra
f99a1437cd Distribute operation workload evenly across peers in randomized test
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-11 14:43:30 +02:00
Antonio Scandurra
02f96c6def Simulate parallelism among peers correctly in randomized collab test
Previously they were all using the same foreground executor, which was
not properly simulating concurrency among tasks from different peers.
2022-04-11 13:42:30 +02:00
Antonio Scandurra
bb8dc6120b Allow taking an Arc<Deterministic> in [gpui::test]-decorated tests 2022-04-11 13:42:30 +02:00
Antonio Scandurra
f9e0899e58 Fix divergence bug when peer reconnects reusing a prior replica id
We forgot to observe the footprint of the reconnecting replica's prior
undos into the local clock. This could cause the replica to generate
edits with a version strictly smaller than what other peers may have
observed. As such, those peers would think they had already seen those
edits and skip them.
2022-04-11 13:17:47 +02:00
Max Brunsfeld
9a4b8e3d8c Load all keybindings from JSON file 2022-04-10 14:29:45 -07:00
Max Brunsfeld
b4babbeeaa Load modal key bindings from JSON file 2022-04-10 11:39:43 -07:00
Max Brunsfeld
1e2eeaa22a Load project and buffer search key bindings from JSON file 2022-04-10 11:30:08 -07:00
Max Brunsfeld
3636c9ec25 Load workspace and editor key bindings from a JSON file 2022-04-10 11:18:08 -07:00
Nathan Sobo
ab8204368c Rename zed-server to collab
Over time, I think we may end up having multiple services, so it seems like a good opportunity to name this one more specifically while the cost is low. It just seems like naming it "zed" and "zed-server" leaves it a bit open ended.
2022-04-09 08:30:42 -06:00
Nathan Sobo
af674e1c00
Merge pull request #770 from zed-industries/better-settings-schema
Improve Settings Completions
2022-04-09 08:23:58 -06:00
Nathan Sobo
56fcffb634 Remove unused imports 2022-04-09 07:55:23 -06:00
Nathan Sobo
17195e615e
Merge pull request #781 from zed-industries/structured-logging
Introduce structured logging
2022-04-09 07:40:24 -06:00
Max Brunsfeld
fd4b81c8fc Allow actions to be deserialized from JSON
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
Max Brunsfeld
ed2b690b9e Merge branch 'main' into namespace-actions 2022-04-08 11:48:43 -07:00
Nathan Sobo
8a7d3ea82a
Merge pull request #778 from zed-industries/test-random-disconnect
Introduce host disconnection in randomized collaboration test
2022-04-08 11:36:39 -06:00
Nathan Sobo
b507e21831 Enable JSON logging at the trace log level in K8s
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:08:52 -06:00
Nathan Sobo
7e5a3f9f6b Introduce structured logging
We're enabling the log crate feature everywhere, but only using it on the server for now.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:06:51 -06:00
Antonio Scandurra
53a7f9c43e Introduce a timeout when processing incoming messages
We have an hypothesis that the server gets stuck while processing
an incoming message, either because the buffer fills up or because
a handler never completes. This should mitigate that and, once we
add logging, give us some clue as to what is causing it exactly.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:21:39 +02:00
Antonio Scandurra
0b1fda3e13 Remove postage from zed-server
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:14:54 +02:00
Antonio Scandurra
24cb44fb00 Remove postage from rpc
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:13:37 +02:00
Antonio Scandurra
32fd4eb3ac Insert project id in connection's project during project registration
...in contrast to doing so during worktree registration. This fixes a
randomized test failure which would panic because store invariants would be
violated. This would happen when a peer disconnected before it had a chance
to register a worktree because, when removing all the state associated with
that peer upon disconnection, we would notice the registered project without
however finding it in the peer's connection state.
2022-04-08 14:41:56 +02:00
Antonio Scandurra
222cd09838 Allow host to reconnect to the server in randomized test 2022-04-08 14:41:30 +02:00
Antonio Scandurra
c994263225 Don't insert an empty vector in Project::buffer_snapshots
Other code paths rely on at least a version always being there, so
we should enforce that invariant everywhere.
2022-04-08 14:14:45 +02:00
Antonio Scandurra
663beab1b9 Avoid panicking when receiving a request for a dropped buffer 2022-04-08 12:10:45 +02:00
Antonio Scandurra
3daaef02ca Replace postage::oneshot with futures::channel::oneshot
This fixes an error in the randomized test that would cause the future
returned from `Worktree::share` to never finish due to a bug in `postage`
that causes its waker to not be notified upon drop.
2022-04-08 12:03:09 +02:00
Antonio Scandurra
da976012a9 Allow simulate_guest and simulate_host to fail when host disconnects 2022-04-08 11:29:00 +02:00
Antonio Scandurra
fae9048a2a Remove non-determinism from Peer caused by using std's HashMap 2022-04-08 11:28:19 +02:00
Keith Simmons
3e40b5bead dynamically inject theme names and language properties into schema 2022-04-07 18:15:02 -07:00
Max Brunsfeld
c801a52492 Convert some actions to use named fields
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:44:37 -07:00
Max Brunsfeld
5242a3a6dc Restructure action macro to assign a namespace to every action
Also, allow arbitrary types to be used as Actions via the impl_actions macro

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:20:49 -07:00
Keith Simmons
035cd37aa8 Add explicit types for LanguageOverrides and Themes to SettingsFileContent in order to improve completions in zed settings file 2022-04-07 16:00:51 -07:00
Max Brunsfeld
206b0f0f8c 0.25.0 2022-04-07 12:03:43 -07:00
Nathan Sobo
717f53e3d2 WIP 2022-04-07 09:29:47 -06:00
Antonio Scandurra
0b8eed64ad
Merge pull request #765 from zed-industries/yield-lsp
Don't starve UI thread when rapidly receiving LSP messages
2022-04-07 17:15:19 +02:00
Nathan Sobo
80d55fd3d8 Don't starve UI thread when rapidly receiving LSP messages
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-07 08:30:42 -06:00
Antonio Scandurra
b396909035 Calculate hitbox based on visible bounds in {Mouse}EventHandler
This is in contrast to not dispatching the event altogether in `Flex` when
the event is not contained in the flex element bounds. That approach was
problematic because it didn't give an opportunity to `MouseEventHandler`s
to handle mouse move events when they didn't intersect with the element bounds,
causing elements to never clear their hover state, cursor style, etc.
2022-04-07 15:12:09 +02:00
Antonio Scandurra
73f2fd6b09 Pass visible bounds to Element::dispatch_event 2022-04-07 15:10:09 +02:00
Antonio Scandurra
ae415ee49b
Merge pull request #763 from zed-industries/inconsistent-diagnostic-state
Fix bad diagnostic state when restarting a language server w/ a running diagnostic task
2022-04-07 09:54:00 +02:00
Antonio Scandurra
7c21b61ad9
Merge pull request #748 from zed-industries/fix-outline-panic
Don't assume there are always matches in outline view
2022-04-07 09:49:13 +02:00
Antonio Scandurra
52251c3463
Merge pull request #745 from zed-industries/scroll-tabs
Allow pane tabs to be scrolled when they overflow
2022-04-07 09:48:54 +02:00
Max Brunsfeld
f73de202d0 Fix diagnostic updates after restarting an LSP w/ a pending diagnostic job 2022-04-06 22:02:27 -07:00
Max Brunsfeld
b354af7bda Use an unbounded channel in gpui test helper methods
The bounded channel could fill up when many events were emitted in one
effect cycle.
2022-04-06 22:02:04 -07:00
Max Brunsfeld
ec837fa6d7 Update breadcrumbs when multibuffers' excerpts change 2022-04-06 17:12:36 -07:00
Max Brunsfeld
8f38ac8270 Tweak structure of Project::on_lsp_progress so it can be auto-formatted
Previously, rustfmt seems to have given up on formatting this method.
2022-04-06 16:35:58 -07:00
Max Brunsfeld
ea63df0519 Don't activate the next pane when opening excerpts 2022-04-06 15:46:11 -07:00
Keith Simmons
67b15ee037 Use language specific tabsize in editor commands
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-04-06 15:10:29 -07:00
Keith Simmons
1812480cbb Tab size is pulled properly from settings instead of hardcoded 2022-04-06 10:23:37 -07:00
Max Brunsfeld
866ffdd4ae Move Settings to its own crate
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:23:33 -07:00
Max Brunsfeld
664f17f92b Avoid maintaining indent size as state on buffers
Indent size is still hard-coded, but it's now controlled by the
editor and not the buffer.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:22:29 -07:00
Nathan Sobo
0214bec7f4 Don't dispatch events to flex children outside of parent flex's bounds 2022-04-06 10:59:03 -06:00
Nathan Sobo
e21f90fec5
Merge pull request #747 from zed-industries/styles-in-typescript
Style the Zed app using Typescript styleTrees and Design Tokens
2022-04-06 10:39:10 -06:00
Nate Butler
b1eda1ac39 Add border to top of status bar 2022-04-06 12:25:15 -04:00
Nathan Sobo
ca64b081fe Don't assume there are always matches in outline view 2022-04-06 09:33:47 -06:00
Antonio Scandurra
d7342e2875 Use Pane::activate_item when navigating to remove duplicated logic 2022-04-06 09:31:54 +02:00
Antonio Scandurra
1453954ef4 Autoscroll to active tab when activating a new item 2022-04-06 09:08:44 +02:00
Nate Butler
e201826d00 Update Light & Dark themes 2022-04-06 01:46:10 -04:00
Nathan Sobo
eb99588368 Remove stray dbg! expressions 2022-04-05 20:02:45 -06:00
Nathan Sobo
ab3bbe1e17 Make the tabs scrollable when they overflow
This adds the ability to make a Flex element scrollable by passing a type tag and instance id, which we use to store the scroll position in an ElementStateHandle.

Still need to allow the element to auto-scroll.
2022-04-05 19:58:15 -06:00
Nathan Sobo
025d857be8 Make UniformListState an Rc<RefCell<>> instead of an Arc<Mutex<>>
We don't need to support multiple threads.
2022-04-05 18:40:25 -06:00
Nate Butler
2a2c4071f4 Update light syntax theme and highlights, player selections 2022-04-05 18:49:17 -04:00
Nate Butler
35f56708f5 Update light theme, change player 3 color
- Changed player 3 color to be less similar to player 1
2022-04-05 18:23:01 -04:00
Nathan Sobo
aeb0b42c7a Report more information when we panic due to an allocation failure 2022-04-05 13:53:13 -06:00
Nathan Sobo
4f4364d510 Ensure we drop the last pane item
Previously, we weren't updating the toolbar's active item when emptying out a pane. This enhances an integration test to ensure that we don't hold references to any editors or buffers once we close everything.
2022-04-05 13:05:14 -06:00
Nathan Sobo
41a27e6925 💄 2022-04-05 12:09:40 -06:00
Nathan Sobo
e2bf89b1e8 Don't require a path in TestAppContext::dispatch_action
Instead, derive it from the presenter. This makes tests easier to write and more reliable since we'll be accurately simulating the actual relationship between parent and child views.
2022-04-05 12:08:25 -06:00
Nathan Sobo
3da8f7f944 Fix dispatch path in test 2022-04-05 11:55:29 -06:00
Antonio Scandurra
c3b947ca26 Show unsaved/conflict prompt only when closing the last tab for an item
Also, ensure we show the correct prompt when files have conflicts.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-05 19:38:27 +02:00
Nate Butler
d21dea6112 Squashed commit of the following:
commit 66d4cbae2ca6d7dd660688d7eb702ae55bf3e0ca
Author: Nate Butler <iamnbutler@gmail.com>
Date:   Tue Apr 5 13:33:33 2022 -0400

    WIP: Improve legibility of contactsPanel and fix errors

    Co-Authored-By: Keith Simmons <keith@the-simmons.net>

commit 000319c583801c5ba4ed7884bbf3da2a591e3f26
Author: Nate Butler <iamnbutler@gmail.com>
Date:   Tue Apr 5 13:13:32 2022 -0400

    WIP
2022-04-05 13:34:06 -04:00
Antonio Scandurra
cac0dddb1b Restructure item closing to take the Workspace instead of the Pane 2022-04-05 19:12:17 +02:00
Antonio Scandurra
939def42e3 v0.24.1 2022-04-05 16:23:27 +02:00
Antonio Scandurra
cc45658b2d Clear diagnostics from buffer when unregistering it from language server
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-05 16:01:33 +02:00