Commit Graph

126 Commits

Author SHA1 Message Date
Conrad Irwin
32f8733313 Code review changes 2023-09-20 21:29:45 -06:00
Conrad Irwin
2d9db0fed1 Flesh out v1.0 of vim : 2023-09-20 20:44:41 -06:00
Conrad Irwin
ea3a1745f5 Add vim-specific interactions to command
This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
2023-09-20 20:44:26 -06:00
Piotr Osiewicz
f66dd43a84
Z 2620 - Sort command palette's entries by name and use count (#2954)
Release Notes:
- Improved command palette's command ordering; commands are sorted
lexicographically and by command's use count in the current session.
2023-09-11 17:50:09 +02:00
Nathan Sobo
b2d9ccc0a2 Move more window methods off AsyncAppContext 2023-08-08 11:38:07 -06:00
Nathan Sobo
da7dc9c880 Work with window handles instead of ids in drag code 2023-08-08 11:14:02 -06:00
Nathan Sobo
d896d89842 Store an AnyWindowHandle in WindowContext 2023-08-08 11:08:37 -06:00
Nathan Sobo
f0da6b05fd Remove TestAppContext::add_view
Instead, we now call this on window handles.
2023-08-07 22:46:48 -06:00
Nathan Sobo
adc50469ff WIP 2023-08-06 12:45:31 -06:00
Nathan Sobo
485c0a482e Don't refcount window handles 2023-08-03 17:11:47 -06:00
Nathan Sobo
884cee6dfd Get tests compiling returning WindowHandle<V: View> from add_window 2023-08-02 14:05:03 -06:00
Alex Viscreanu
c7669317ec
feat(workspace): allow alternative actions to open files and symbols in split
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-14 21:49:15 +02:00
Kirill Bulatov
4b4d049b0a Refactor LSP restart logic
Instead of storing `initialization_options` in every LSP adapter as
before, store previous LSP settings in `Project` entirely.

This way, we can later have use multiple different project
configurations per single LSP with its associated adapter.

co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-11 21:56:55 +03:00
Piotr Osiewicz
60b4054b0a
Fix up toggles 2023-06-20 16:05:23 -07:00
Piotr Osiewicz
e92015b12f
Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
Max Brunsfeld
67a25126d4 Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Max Brunsfeld
39618ae32d Define language settings in the language crate 2023-05-16 17:29:53 -07:00
Antonio Scandurra
92183e0d72 Ensure querying keystrokes or actions is safe
This is achieved by moving `available_actions` into `AsyncAppContext` (where
we know no view/window is on the stack) and `keystrokes_for_action` into `LayoutContext`
where we'll fetch the previous frame's ancestors and notify the current view if those
change after we perform a layout.
2023-05-04 09:53:31 +02:00
Antonio Scandurra
7f137ed3dd Compute view ancestry at layout time 2023-05-03 16:36:14 +02:00
Antonio Scandurra
e3b2407ebf Run until parked now that the command palette spawns to dispatch action 2023-05-01 16:58:07 +02:00
Antonio Scandurra
eb2cce98a7 Move dispatch_action_any_action_at to AsyncAppContext 2023-05-01 16:40:57 +02:00
Max Brunsfeld
ebbe52e6b0 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
Nathan Sobo
e6604d1641 Fix missing actions in the command palette
Previously, the workspace view was on the stack when we were computing the
available actions, which excluded it. This is a stopgap. We should find a
better solution ASAP.
2023-04-21 15:59:29 -06:00
Nathan Sobo
fe492eacbf Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
Antonio Scandurra
03619dfa55 Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Antonio Scandurra
e282c7ad45 Finish converting all the pickers to the new API 2023-04-20 15:26:05 +02:00
Nathan Sobo
d70644618a WIP: Make PickerDelegate a fully owned object instead of a view
This avoids issues with the parent view being on the stack when we want to
interact with the delegate from the picker. Still have several picker usages
to convert.
2023-04-19 22:05:29 -06:00
Antonio Scandurra
d03c431f9a Fix warnings/errors now that AsyncAppContext::update returns Result 2023-04-18 14:58:57 +02:00
Antonio Scandurra
9ef79735dc Move more window-specific methods from AppContext to WindowContext 2023-04-14 10:29:35 +02:00
Nathan Sobo
a25f962185 WIP 2023-04-12 12:13:35 -06:00
Antonio Scandurra
83070a19c4 WIP 2023-04-12 15:55:43 +02:00
Nathan Sobo
e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo
8136d8a8a6 Fix formatting 2023-04-06 15:54:44 -06:00
Nathan Sobo
de9bf6dfbd Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Nathan Sobo
82a713fd1d Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Mikayla Maki
0b0c7e4ce9 Move command palette filter into collections crate
Filter out copilot commands from command palette when not active
2023-03-28 20:13:17 -07:00
Antonio Scandurra
5471217089 Use the same serde version across the entire workspace 2023-03-28 09:42:00 -07:00
Mikayla Maki
152755b043 Add blank pane experience 2023-03-08 17:56:39 -08:00
Mikayla Maki
b500ed3171 Changed label and text to be generic over static strings and owned strings 2023-02-21 16:47:29 -08:00
Kay Simmons
327932ba3b Remove catch all keymap and KeyPressed action 2023-02-13 13:50:37 -08:00
Mikayla Maki
d060114f00 Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00
Kay Simmons
73e7967a12 working f and t bindings 2023-01-06 14:24:20 -08:00
Kay Simmons
1cc3e4820a working serialized writes with panics on failure. Everything seems to be working 2022-12-03 16:06:01 -08:00
Mikayla Maki
4798161118 Distributed database pattern built.
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
a5edac312e Moved to workspaces crate... don't feel great about it 2022-12-03 16:05:26 -08:00
Mikayla Maki
3451a3c7fe Rebase - Got Zed compiling and fixed a build error due to conflicting dependencies that cargo didn't catch :(
Co-Authored-By: kay@zed.dev
2022-12-03 16:04:10 -08:00
Antonio Scandurra
0b231e58fd Show placeholder text for pickers 2022-11-04 10:18:47 +01:00
Nathan Sobo
6e363e464c Start on view-level dispatch approach for keyboard events 2022-10-16 11:46:31 -06:00
Nathan Sobo
bc03592912 Only invalidate parent view on click/hover if we read that state when rendering
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-14 18:09:15 -06:00
Antonio Scandurra
a5a60eb854 Log view name alongside error in ChildView 2022-10-13 15:44:01 +02:00
K Simmons
b88abcacac WIP dock split button and default item 2022-09-11 15:31:44 -07:00
ForLoveOfCats
8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
K Simmons
3bdf05c0cd fix up command palette 2022-08-09 17:15:54 -07:00
K Simmons
f5a6a112c8 Address picker issues 2022-08-09 17:15:54 -07:00
K Simmons
690ea57211 WIP compiling but failing with circular reference 2022-08-09 17:15:52 -07:00
K Simmons
4271eb3624 Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly 2022-08-09 17:09:16 -07:00
Mikayla Maki
c6d5decbf9 Finished erorr terminal refactoring 2022-07-21 12:37:15 -07:00
Keith Simmons
cea7d3f5a2 add test for filter 2022-06-28 13:45:34 -07:00
Keith Simmons
f6292437fa Add command palette filter global and update it when vim mode is enabled/disabled 2022-06-28 13:35:43 -07:00
Max Brunsfeld
724affc442 Upgrade deps to avoid multiple versions of transitive deps
* env_logger
* prost-build
* bindgen
2022-06-02 17:38:33 -07: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
3ac6fc89c1 Pretty-print JSON of server snapshot 2022-05-26 09:34:39 +02: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
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
8481834847 Give hover state to picker items, keystrokes in command palette 2022-04-28 15:17:56 -07:00
Max Brunsfeld
a60c75e343 Rename Selector -> Picker in theme 2022-04-28 14:45:32 -07:00
Antonio Scandurra
033d000489 Replace underscores with spaces when humanizing action names 2022-04-22 10:24:12 +02:00
Max Brunsfeld
d8ad0d8e4e Format action names more readably in command palette
Also add a unit test for the command palette
2022-04-18 18:12:43 -07:00
Max Brunsfeld
a4f259066b tmp 2022-04-18 17:30:17 -07:00
Max Brunsfeld
11eba96cb8 Allow toggling other modals from the command palette 2022-04-18 17:11:39 -07:00
Max Brunsfeld
f5377c2f50 Highlight fuzzy match positions in command palette 2022-04-18 17:11:39 -07:00
Max Brunsfeld
7b16860806 Use Picker in ThemeSelector 2022-04-18 17:11:39 -07:00
Max Brunsfeld
7964464e3d Rename SelectorModal -> Picker, put it in its own crate 2022-04-18 17:11:39 -07:00
Max Brunsfeld
bde52d5c93 Add basic styling to keystrokes in command palette 2022-04-18 17:11:37 -07:00
Max Brunsfeld
3901d9d544 Display key bindings in the command palette
They still need to be styled.

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-04-18 17:11:08 -07:00
Max Brunsfeld
4630071f58 Start work on a command palette 2022-04-18 17:11:08 -07:00