Max Brunsfeld
a858b3fda9
Treat window deactivation as a focus change for the purpose of autosave
2022-07-06 11:20:29 -07:00
Antonio Scandurra
ab4931da65
Prevent autosave for deleted files
2022-07-06 17:25:33 +02:00
Antonio Scandurra
9286893177
Save item when closing it if autosave on focus change is enabled
2022-07-06 17:04:41 +02:00
Antonio Scandurra
5e00df6267
Move autosave tests down into Workspace
2022-07-06 16:55:05 +02:00
Antonio Scandurra
b937c1acec
Move autosave logic up into Workspace
and Pane
2022-07-06 16:33:22 +02:00
Max Brunsfeld
8048758990
Add application menu item to open default key bindings
2022-07-05 12:41:38 -07:00
Max Brunsfeld
581c9af395
Adjust pane, tab, panel management bindings to match VS Code
2022-06-29 15:33:46 -07:00
Max Brunsfeld
8fe6809932
Exclude hidden worktrees from project's diagnostic summaries
2022-06-28 14:23:24 -07:00
Antonio Scandurra
57f34c6992
💄
2022-06-28 08:04:39 +02:00
Antonio Scandurra
c6e7ae528f
Add test for reopening closed items
2022-06-27 17:59:25 +02:00
Antonio Scandurra
0652542f60
Introduce pane::ReopenClosedItem
bound to cmd-shift-t
2022-06-27 17:44:33 +02:00
Antonio Scandurra
a21dbdd0d6
Update window edited status when pane item is removed
2022-06-23 14:28:10 +02:00
Antonio Scandurra
d9b5357234
Always prevent window from closing and manually invoke Workspace::close
...
This ensures we ask the user to save their state if there are unsaved
changes.
2022-06-23 11:44:14 +02:00
Antonio Scandurra
ca8ddcdeec
Set window's edited = true
when there are unsaved changes
2022-06-23 10:59:50 +02:00
Antonio Scandurra
137a3996a1
Replace "Remove Folder from Project" label with "Remove from Project`
2022-06-20 10:53:26 +02:00
Max Brunsfeld
dd7b874039
Return focus to the workspace center on escape
2022-06-16 11:30:02 -07:00
Antonio Scandurra
4e4210ac39
Open a buffer for every language server error when clicking on status
2022-06-16 10:00:29 +02:00
Antonio Scandurra
516bd13474
Add tooltip to follow collaborators
2022-06-15 17:08:39 +02:00
Antonio Scandurra
f2a48c6b02
Add tooltips for sidebar buttons
2022-06-15 13:50:04 +02:00
Antonio Scandurra
da1eb91935
Replace pane::Split
action with Split{Left,Up,Right,Down}
...
This allows us to show them in the command palette.
2022-06-15 13:06:59 +02:00
Antonio Scandurra
68093342e7
Broadcast only visible worktree root names
2022-06-14 15:15:23 +02:00
Antonio Scandurra
cfbd8b94d1
Prevent setting files from showing up in project and contacts panels
2022-06-14 14:47:16 +02:00
Max Brunsfeld
b9eb875bf4
Prompt to save changes before quitting the app
2022-06-10 17:26:33 -07:00
Antonio Scandurra
3a69943df3
Require that PartialEq
is implemented for Action
2022-06-06 09:18:44 +02:00
Antonio Scandurra
74aa9c1320
Capture mouse events when rendering disconnected overlay
...
We do so by replacing `EventHandler::capture` with a new `::capture_all` method.
After switching to mouse regions as part of zed-industries/zed#1081 , overriding
`dispatch_event` on `EventHandler` wasn't enough anymore because mouse interactions
take place on a privileged code path that runs *before* dispatching any event.
With this change, `EventHandler` will now push a mouse region that intercepts all
mouse interactions, as well as pushing a cursor region that resets the cursor style
to `Arrow`.
One interesting change as part of this is that we've removed the ability to see which
event we are capturing: we were not using this capability anyway and `capture_all` provides
a simpler interface, so I went with that. In the future, we can opt into capturing specific
events or mouse interactions if there's a code path that needs that.
2022-06-04 10:41:29 +02:00
Max Brunsfeld
41b7fd4a27
Rename a public/private to online/offline in a few more places
2022-06-03 17:08:44 -07:00
Max Brunsfeld
e18bc24989
Rename project's 'public'/'private' flag to 'online'/'offline'
2022-06-03 14:39:06 -07:00
Max Brunsfeld
afdd386057
Move persistence and restoration logic from workspace into project
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 11:52:14 -07:00
Max Brunsfeld
6a3a3a1124
Add tooltip to the toggle public button in the contacts panel
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 10:36:29 -07:00
Max Brunsfeld
f7e7a7c6a7
Use rocksdb to store project paths' public/private state
2022-06-02 17:38:33 -07:00
Max Brunsfeld
3ea061a11e
Allow making projects private
2022-06-02 17:32:42 -07:00
Max Brunsfeld
7ef9de32b1
Show private projects in the contacts panel
...
Introduce a ProjectStore that lets you iterate through all open projects.
Allow projects to be made public by clicking the lock.
2022-06-02 17:29:11 -07:00
Max Brunsfeld
a60fef52c4
Start work on private projects
2022-06-02 17:29:11 -07:00
Antonio Scandurra
d180f7a2c3
Jump to primary diagnostic when clicking on header's jump icon
2022-05-31 16:25:14 +02:00
Antonio Scandurra
339069b1d3
Cap MessageStream
buffer size to 1MB
...
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Antonio Scandurra
20e1044d49
Merge branch 'main' into project-panel-with-new-mouse-events
2022-05-30 18:29:46 +02:00
Max Brunsfeld
a88b4eb3c5
Populate the window title whenever worktrees or active path change
...
* Refactor the way the project's active entry is assigned. Assign it
together with the window title, as opposed to on every notification
from a pane.
* Emit the ActiveItem event from panes consistently, even when adding
the first item to an empty pane.
2022-05-27 10:51:14 -07:00
Antonio Scandurra
9099c40364
Merge branch 'mouse-events' into project-panel-context-menu
2022-05-27 12:07:00 +02:00
Antonio Scandurra
82d6e606fc
Use a MouseEventHandler
for activating tabs on mouse down
...
Previously, we were using an `EventHandler` which doesn't take into
account other mouse regions floating above the rendered element. This
was problematic because, when clicking the `x` icon on a tab that was
not active, we were first activating it and then closing it.
2022-05-27 11:43:58 +02:00
Antonio Scandurra
98de269b4a
Don't focus editor when clicking on sidebar resize handle
2022-05-27 11:36:37 +02:00
Nathan Sobo
893f15ddab
Switch MouseEventHandler to use MouseRegions
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 20:00:01 -06:00
Antonio Scandurra
5b2d6e41f3
Introduce keyboard navigation in context menus
2022-05-26 16:36:30 +02:00
Antonio Scandurra
991eb742b0
Start adding project panel context menu actions
2022-05-26 15:23:40 +02:00
Nathan Sobo
b110fd5fb7
Render a context menu when right-clicking in project panel
...
It doesn't currently do anything, but I managed to get it rendering in an absolutely positioned way.
2022-05-26 09:59:25 +02:00
Antonio Scandurra
3ac6fc89c1
Pretty-print JSON of server snapshot
2022-05-26 09:34:39 +02:00
Max Brunsfeld
acf9a59cc2
Merge pull request #1027 from zed-industries/missing-menu-commands
...
Add missing File menu commands, improve handling of unsaved multibuffers
2022-05-23 21:29:32 -07:00
Max Brunsfeld
ece8604547
Fix comments in Pane::close_items
2022-05-23 18:07:22 -07:00
Max Brunsfeld
0becbe482a
Distinguish between singleton and non-singleton workspace items
...
* Prompt to save singleton items before non-singleton ones
* Don't prompt to save multi-buffers if they contain excerpts to items that are open elsewhere and not being closed.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-23 16:03:00 -07:00
Nathan Sobo
d8dbbf1c05
Merge remote-tracking branch 'origin/main' into invite-codes-2
2022-05-23 15:46:39 -06:00
Max Brunsfeld
fbd589b589
Start work on handling multibuffers properly when closing unsaved buffers
2022-05-22 16:48:33 -07:00
Max Brunsfeld
21206800bc
Add "Close Window" command
2022-05-20 16:53:03 -07:00
Max Brunsfeld
b08cad9ef5
Add "Save As" command
2022-05-20 16:24:42 -07:00
Max Brunsfeld
8ed33cadeb
Add "Add Folder to Project" command to application menu
2022-05-20 16:19:43 -07:00
Max Brunsfeld
e72f5cea22
Add "New Window" command
2022-05-20 11:01:20 -07:00
Antonio Scandurra
0597c662e4
Show contacts panel the first time a new user connects to collab
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:33:09 +02:00
Max Brunsfeld
c4554c1720
Replace build_workspace fn with an initialize function that takes a workspace
...
This makes it clearer that the function is not providing necessary
dependencies to a workspace, but rather configuring it with all of
the panels and widgets which are defined in downstream crates.
2022-05-19 16:50:22 -07:00
Max Brunsfeld
ef0b584532
Remove AppState from workspace actions
...
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Max Brunsfeld
9b29245590
Avoid duplicate notifications
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-17 11:19:22 -07:00
Antonio Scandurra
8f88803695
Automatically follow host when joining a project
2022-05-17 15:35:57 +02:00
Antonio Scandurra
cc598a6f71
Send LeaveProject
when waiting room is dismissed while waiting
2022-05-17 11:25:14 +02:00
Nathan Sobo
d821e7a4c1
Cancel join requests when the requester closes the window
2022-05-16 20:29:36 -06:00
Nathan Sobo
7c3eebf93e
Refine messages on waiting to join screen and include host avatar
2022-05-16 16:52:31 -06:00
Antonio Scandurra
ed6ed99d8f
Show the reason why a join request was declined
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-16 19:57:50 +02:00
Antonio Scandurra
aa90c06012
Display a temporary window while remote project is loading
2022-05-16 17:45:50 +02:00
Max Brunsfeld
be51a58311
Start work on requesting to join projects
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-12 17:53:11 -07:00
Antonio Scandurra
c7802af88b
Use cmd-9
and cmd-shift-9
to toggle contacts panel focus/visibility
2022-05-12 12:11:27 +02:00
Max Brunsfeld
0ba656aa0e
Improve layout and styling of contact notifications
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-11 14:20:05 -07:00
Antonio Scandurra
933a1f2cd6
Show badge when there are pending contact requests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-11 17:39:03 +02:00
Nathan Sobo
fe89de8b11
Dismiss contact request notification if request is cancelled
2022-05-10 18:50:18 -06:00
Nathan Sobo
3bca1c29e2
Present a blank notification upon receipt of a contact request
2022-05-10 18:33:39 -06:00
Nathan Sobo
bd2ae304fa
Start on workspace notifications
2022-05-10 17:46:46 -06:00
Nathan Sobo
9c68c3e8a9
Put context parameter last in toggle_modal callback
...
This is more consistent with our treatment of context params everywhere else.
2022-05-10 16:46:53 -06:00
Max Brunsfeld
dc465839e1
Round sidebar panels' widths to whole numbers of pixels
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-10 11:25:51 -07:00
Nathan Sobo
b721f0064a
Start on contact finder modal
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-10 07:24:14 -06:00
Antonio Scandurra
954fabec42
Don't hide sidebar when hitting cmd-1
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-05 15:34:36 +02:00
Antonio Scandurra
2e6cf2011d
When opening items via project panel, only focus them on double-click
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-05 15:27:27 +02:00
Antonio Scandurra
61346f734d
WIP
2022-05-05 15:15:58 +02:00
Antonio Scandurra
3ee4d90c19
Parameterize avatar_margin
and assign it a default of 8
2022-05-03 18:04:53 +02:00
Antonio Scandurra
5d0c3c43e8
Add right padding to titlebar instead of margins on elements
...
This fixes a visual glitch causing the avatar to be shown too close to
the right edge of the window when the share icon was not present.
2022-05-02 09:27:37 +02:00
Max Brunsfeld
8481834847
Give hover state to picker items, keystrokes in command palette
2022-04-28 15:17:56 -07:00
Max Brunsfeld
6578ae5393
Use Interactive helper to theme titlebar buttons
2022-04-28 12:08:15 -07:00
Max Brunsfeld
772f4579fc
Restructure status bar theme to style interactive elements more concisely
...
Introduce an `Interactive` wrapper type that allows themes to selectively
override properties of items in a hovered or active state.
2022-04-28 10:59:32 -07:00
Max Brunsfeld
e88156645d
Update the styling of the lsp status indicator
2022-04-27 16:48:33 -07:00
Max Brunsfeld
9e87be722e
Start re-styling diagnostic indicator in status bar
2022-04-27 14:25:39 -07:00
Max Brunsfeld
7f63ed3835
Allow styling sidebar icons and groups in themes
2022-04-27 14:25:39 -07:00
Max Brunsfeld
0291f2d54a
Move sidebar toggle buttons to the status bar
2022-04-27 14:25:39 -07:00
Nathan Sobo
78afbb3599
Remove async-std and surf from client
...
Switch to isahc library. It's not as fancy, but it works and has a smaller footprint.
2022-04-26 21:19:15 -06:00
Antonio Scandurra
c955645bc0
Update share icon and swap its posiiton
2022-04-26 14:35:13 +02:00
Antonio Scandurra
9d6a7a83a0
Show worktree root names in titlebar and align them left
2022-04-26 13:21:58 +02:00
Nathan Sobo
92f040df00
Apply cursor styles during paint
...
This makes the editor's cursor an IBeam and properly deals with nested cursor styles.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-22 10:54:18 -06:00
Antonio Scandurra
3def7a6803
Avoid flicker when toggling project browser on workspace open
2022-04-22 11:53:45 +02:00
Antonio Scandurra
9730213ed7
Move project browser toggling logic in workspace::open_paths
2022-04-22 11:25:23 +02:00
Antonio Scandurra
bba65e120d
Add only one worktree when running zed /dir /dir/file
2022-04-22 11:06:17 +02:00
Antonio Scandurra
9d8e3f51c8
Show project panel when opening a folder via the CLI
2022-04-22 10:45:46 +02:00
Antonio Scandurra
fb87bacc7e
Merge branch 'main' into auto-update
2022-04-21 09:53:06 +02:00
Antonio Scandurra
f7055c2acc
Implement zed --wait
2022-04-20 17:28:31 +02:00
Max Brunsfeld
eee1cec3d4
🎨 Remove unnecessary JoinProjectParams struct
2022-04-20 17:27:33 +02:00
Max Brunsfeld
20657566b3
Make all pickers respect mouse clicks
2022-04-18 17:11:39 -07:00
Max Brunsfeld
4630071f58
Start work on a command palette
2022-04-18 17:11:08 -07:00
Max Brunsfeld
2ea2ba358f
Add back toggle sidebar key bindings
2022-04-13 11:14:10 -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
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
3636c9ec25
Load workspace and editor key bindings from a JSON file
2022-04-10 11:18:08 -07: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
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
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
Antonio Scandurra
73f2fd6b09
Pass visible bounds to Element::dispatch_event
2022-04-07 15:10:09 +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
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
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
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
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
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
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
Antonio Scandurra
cac0dddb1b
Restructure item closing to take the Workspace
instead of the Pane
2022-04-05 19:12:17 +02:00
Antonio Scandurra
5ef484c9a1
Update followers when navigating back and forth
2022-04-05 10:42:35 +02:00
Max Brunsfeld
9c469f2fdb
Add remaining logic for downloading updates, add status bar indicator
2022-04-04 18:34:14 -07:00
Nathan Sobo
9702ab0075
Merge pull request #719 from zed-industries/misc-breadcrumbs-bugs
...
Fix miscellaneous breadcrumbs bugs
2022-04-04 05:42:55 -06:00
Antonio Scandurra
089b0e8e0f
Remove duplicate activation logic when removing items from pane
2022-04-03 13:00:39 +02:00
Antonio Scandurra
80b599c4ef
Prompt to save untitled buffers when closing them while they are dirty
2022-04-03 12:43:33 +02:00
Antonio Scandurra
d0a17f8c2c
Update toolbar and automatically unfollow when navigating back and forth
2022-04-02 16:32:50 +02:00
Antonio Scandurra
e93ab4db14
Prompt before closing buffer with unsaved changes or conflicts
2022-04-01 14:33:07 +02:00
Antonio Scandurra
703f1c3be0
Introduce workspace::Item::reload
to manually trigger a reload
2022-04-01 14:02:49 +02:00
Antonio Scandurra
cd5389b4d8
Let toolbar items specify flex
when they have a primary location
2022-04-01 10:55:38 +02:00
Antonio Scandurra
7f9ff47089
Hide breadcrumbs when project search has no results
2022-04-01 10:00:21 +02:00
Antonio Scandurra
9f939bd007
Fix styling of project search bar
2022-04-01 09:59:36 +02:00
Nathan Sobo
903810f22e
Style search in buffer below breadcrumbs
...
We still have issues with project search styling.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 11:44:16 -06:00
Nathan Sobo
8bfac63e0d
Render the search UI on a separate row from the breadcrumbs
...
- In project search, render it above the breadcrumbs
- In buffer search, render it below
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 10:36:39 -06:00
Antonio Scandurra
0453dd1101
Allow flex items to float to the end of the flex axis
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-30 16:46:14 +02:00
Antonio Scandurra
9df2dacd85
Restructure Pane
to have a single Toolbar
with multiple items
2022-03-29 11:48:21 +02:00
Antonio Scandurra
d296bb21a8
Emit Event::PaneAdded
in Workspace
when a new pane is created
2022-03-29 10:24:42 +02:00
Nathan Sobo
d4436277ee
Merge pull request #682 from zed-industries/vim-hjkl
...
Vim hjkl
2022-03-26 07:11:46 -06:00
Keith Simmons
bb9b36dccd
Add initial vim mode mode switching
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00
Nathan Sobo
a3e9a3afbf
Clear out project registration and sharing state on disconnect
...
Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:15:08 -06:00
Antonio Scandurra
5cd94b5b92
WIP
2022-03-23 19:05:46 +01:00
Antonio Scandurra
60b6b0b317
Cycle through panes spatially rather than in the order in which they created
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 15:06:25 +01:00
Antonio Scandurra
4f27049305
Focus followed items when they become active if the pane is active
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:41:48 +01:00
Antonio Scandurra
edc038a1cf
Activate previous pane and next pane via cmd-k cmd-left
and cmd-k cmd-right
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:26:00 +01:00
Nathan Sobo
097bbe3e07
Update follow binding, remove unfollow binding
...
The previous binding to follow had ergonomics issues for the frequency that I think we'll want to use it. It would also conflict with the sub-word selection binding.
Now that moving the cursor etc unfollows, I don't think we need the follow binding.
2022-03-23 06:19:35 -06:00
Max Brunsfeld
880eaa268b
Coalesce followed view updates only within one frame
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:03:24 -07:00
Max Brunsfeld
4435d9b106
Combine updates from multiple view events when updating followers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:22:42 -07:00
Max Brunsfeld
c105802b2d
Allow customizing the pane's following border width in the theme
2022-03-22 13:32:25 -07:00
Antonio Scandurra
284a446be7
WIP
2022-03-22 13:35:37 +01:00
Antonio Scandurra
016fb01ef8
Merge branch 'main' into follow
2022-03-22 11:20:55 +01:00
Antonio Scandurra
e5a99cf8cd
Stop following when leader disconnects
2022-03-22 11:16:04 +01:00
Antonio Scandurra
ffaf409a31
Forget last pane's leader when such pane is removed
...
This is just a memory optimization and doesn't cause any observable
change in behavior.
2022-03-22 11:06:52 +01:00
Antonio Scandurra
7d566ce455
Follow last collaborator or the next one via cmd-alt-shift-f
2022-03-22 10:16:58 +01:00
Antonio Scandurra
67dbc3117d
Stop following when activating a different item on the follower pane
2022-03-22 09:42:37 +01:00
Antonio Scandurra
3117554568
Automatically unfollow when editing, scrolling or changing selections
2022-03-22 09:17:01 +01:00
Max Brunsfeld
c550fc3f01
WIP - Start work on unfollowing automatically
2022-03-21 21:52:28 -07:00
Max Brunsfeld
c8f36af823
Show borders around avatars and panes to indicate following state
2022-03-21 15:12:15 -07:00
Max Brunsfeld
06cd9ac664
Match the leader's last selection when unfollowing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 14:04:55 -07:00
Max Brunsfeld
3e0bc979c3
Avoid infinite loop when collaborators follow each other
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 11:47:00 -07:00
Antonio Scandurra
13a2dacc60
💄
2022-03-21 18:16:06 +01:00
Antonio Scandurra
9575796f9e
Allow unfollowing of leaders by clicking on their avatar
2022-03-21 17:10:23 +01:00
Antonio Scandurra
a154e4500b
Implement Workspace::unfollow
...
This also changes the structure of the follow state back to be per-pane. This
is because we can't share the same view state across different panes for
a couple of reasons:
- Rendering the same view in N different panes is almost always not something
that we want due to global state such as focus.
- If we allowed it and a user followed the same person in two different panes,
there would be no way of unfollowing in one pane without also unfollowing in
the other.
2022-03-21 16:55:18 +01:00
Antonio Scandurra
a2dbebd9ba
Hide cursor both locally and remotely when following
2022-03-21 15:16:56 +01:00
Nathan Sobo
7cb8935ff5
Pass project entry id to Pane when opening a project items
...
This fixes an oversight where we were failing to associate project items with their project entry ids, which broke the logic that prevented the same project entry from being opened twice in the same pane.
2022-03-20 08:54:20 -06:00
Max Brunsfeld
570c987455
Handle view updates when following
...
Basic following now works. Editors' scroll positions
are their only replicated view state.
2022-03-18 15:56:57 -07:00
Max Brunsfeld
e338da0271
Allow clicking a titlebar avatar to initiate following
2022-03-18 13:37:07 -07:00
Max Brunsfeld
d860ed25c1
Allow FollowableItem::to_state_message to return None
...
This way, we can avoid a panic if we don't handle certain cases,
like a non-singleton editor.
2022-03-18 13:36:05 -07:00
Max Brunsfeld
d02ab9bd06
Start work on updating editors's scroll positions when following
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 12:56:20 -07:00
Max Brunsfeld
2c53175566
Rename FollowedItem -> FollowableItem
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 10:12:51 -07:00
Antonio Scandurra
f4520d4184
WIP
2022-03-18 18:07:03 +01:00
Antonio Scandurra
7d7e10598a
Broadcast active view to followers
2022-03-18 16:00:03 +01:00
Antonio Scandurra
3d81eb9ddf
Allow accessing workspace after adding item to pane
2022-03-18 14:59:53 +01:00
Antonio Scandurra
10e6d82c3e
WIP: Start on sending view updates to followers
2022-03-18 14:20:09 +01:00
Antonio Scandurra
f0b7bd6e17
Serialize initial follow state in leader and reflect it in follower
2022-03-18 10:22:13 +01:00
Max Brunsfeld
0fdaa1d715
WIP
2022-03-17 17:53:49 -07:00
Max Brunsfeld
5702737de2
Start work on an integration test for following
2022-03-17 13:53:06 -07:00
Max Brunsfeld
845457e2c4
Always read project entry id from workspace::Item
...
We cannot store a workspace item's project entry id separately,
since buffers' entry ids can change (for example when doing
a *save as*).
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-17 10:58:20 -07:00
Max Brunsfeld
9716ff7964
Set up logic for starting following
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-17 10:46:54 -07:00
Antonio Scandurra
2b4738d82d
Avoid passing a closure to workspace::register_project_item
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-17 17:39:25 +01:00
Antonio Scandurra
5d14c9abdf
Introduce workspace::register_project_item
...
This lets downstream crates like `editor` define how project items should be
opened.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 15:54:34 +01:00
Antonio Scandurra
bff414cfbc
Remove Editor::find_or_create
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 15:13:47 +01:00
Antonio Scandurra
44d997c00c
Rename app_state
to global
in gpui
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:33:01 +01:00
Antonio Scandurra
84bacc556f
Rename build_editor
to build_item
in Pane::open_item
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:31:05 +01:00
Antonio Scandurra
6446660c88
Rename open_buffer_for_path
to open_buffer
2022-03-17 11:42:13 +01:00
Antonio Scandurra
e6755f4115
Search only in active pane when using Editor::find_or_create
2022-03-17 11:39:39 +01:00
Antonio Scandurra
a691c2fbdb
Delete unused code
2022-03-17 11:33:58 +01:00
Antonio Scandurra
0efce8f70a
Rename ItemView
to Item
2022-03-17 11:32:46 +01:00
Antonio Scandurra
aced1e2315
Finish refactoring of how editors are opened
2022-03-17 11:29:46 +01:00
Nathan Sobo
728c708150
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-16 17:40:09 -06:00
Nathan Sobo
1f9885ec42
Remove open_item_in_pane
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-16 16:08:13 -06:00
Nathan Sobo
0036e5c86c
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-16 15:59:47 -06:00
Max Brunsfeld
a88320dc5f
Remove workspace::Item trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2022-03-16 13:34:06 -07:00
Max Brunsfeld
3a439f141d
Open settings file in new window if current window isn't local
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-14 17:12:07 -07:00
Antonio Scandurra
bae44d8132
Re-render workspace when removing an inactive pane
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-14 15:49:08 +01:00
Max Brunsfeld
b33a049958
Merge branch 'main' into settings-file
2022-03-13 10:43:23 -07:00
Max Brunsfeld
20fed599b2
Start work on relaying settings to language servers
2022-03-11 17:36:27 -08:00
Max Brunsfeld
48848de82c
Store settings as a global via a gpui app_state
2022-03-11 15:58:58 -08:00
Max Brunsfeld
7a68b2d371
Provide JSON language server with settings schema
2022-03-11 11:46:22 -08:00
Keith Simmons
17ac240511
Merge pull request #586 from zed-industries/global-events
...
Global Events
Co-authored-by: Max Brunsfeld <nathan@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-11 11:42:25 -08:00
Keith Simmons
144591d639
Minor renames for clarity
2022-03-11 11:25:36 -08:00
Max Brunsfeld
6091caee8e
Merge branch 'main' into settings-file
2022-03-11 10:04:17 -08:00
Nathan Sobo
fd36b25db1
Merge pull request #587 from zed-industries/lsp-progress
...
Show language server progress in the status bar
2022-03-11 10:57:24 -07:00