Max Brunsfeld
3636c9ec25
Load workspace and editor key bindings from a JSON file
2022-04-10 11:18:08 -07: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
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
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