Commit Graph

125 Commits

Author SHA1 Message Date
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
74ca223114 Fix formatting for the entire workspace 2023-04-14 12:08:33 +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
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
Mikayla Maki
fa32a20c42 fixup! fixup! fixup! removed copilot from generated schema and command palette 2023-04-03 21:46:59 -07:00
Mikayla Maki
6bfecd7f66 Refactor staff mode into a seperate crate and make copilot initialization wait for the staff mode flag to be flipped 2023-04-03 20:16:45 -07:00
Nathan Sobo
82a713fd1d Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Max Brunsfeld
cbeb6e692d Move postage crate version specification to workspace Cargo.toml 2023-03-21 11:26:13 -07:00
Mikayla Maki
19fc143209 Add base keymap setting
Format all files

Co-Authored-by: Nathan <nathan@zed.dev>
2023-03-07 12:19:51 -08:00
Mikayla Maki
3b31f10c6f Made the theme picker sort from dark to light
Added a layer into 'ConstrainedBox' to clip it
's children

Made the welcome experience responsive to small and large sizes
2023-03-06 18:36:18 -08:00
Mikayla Maki
57781fd7aa Move StaffMode declaration out of paths 2023-01-27 15:45:33 -08:00
Mikayla Maki
2802e3a1c6 Fixed failling tests 2023-01-27 15:44:17 -08:00
Mikayla Maki
ea39983f78 Removed old experiments settings and staff mode flag, added new StaffMode global that is set based on the webserver's staff bit 2023-01-27 15:43:12 -08:00
Mikayla Maki
d060114f00 Added complete scripts for generating third party license files 2023-01-23 12:47:12 -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
Mikayla Maki
dd1320e6d1 Improved settings writing to be strongly typed and based on settings file content diffs
Co-Authored-By: kay@zed.dev
2022-10-12 17:05:23 -07:00
Mikayla Maki
e7b6d1befe Added theme and dock anchor saving :D 2022-10-11 19:18:29 -07:00
Mikayla Maki
a833652077 Undid change to paths variables and cleaned up leftovers 2022-10-11 12:48:30 -07:00
Mikayla Maki
7ce758b343 Added notes from working with Nathan 2022-10-11 12:48:30 -07:00
Mikayla Maki
cc8ae45012 Added theme writing code, really bad race condition 2022-10-11 12:48:30 -07:00
Mikayla Maki
ec5d8f8c7c Removed github username check, added settings file 2022-09-08 16:27:46 -07:00
Mikayla Maki
2b4db9b16e Added experimental themes flag 2022-09-08 15:47:27 -07:00
Mikayla Maki
bdf655d757 Sorted themes correctly 2022-09-08 14:11:48 -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
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
Nathan Sobo
893f15ddab Switch MouseEventHandler to use MouseRegions
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 20:00:01 -06: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
ec41dd9f18 Remove checked-in theme JSON files
* Generate the themes on build
* In debug builds, watch the theme sources. When they change, re-generate
  the themes and reload the current theme, removing the need for the
  `theme_selector::Reload` command.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-05-18 12:43: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
bf27edfdee Sort themes by light/dark first and then alphabetically 2022-04-26 12:09:25 +02:00
Max Brunsfeld
7b16860806 Use Picker in ThemeSelector 2022-04-18 17:11:39 -07:00
Max Brunsfeld
92a5c30389 Merge branch 'main' into load-keymaps 2022-04-11 15:55:10 -07:00
Max Brunsfeld
b4babbeeaa Load modal key bindings from JSON file 2022-04-10 11:39:43 -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
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
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
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
a739c362d9 Rename editor::Event::Edited to editor::Event::BufferEdited
This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
2022-03-24 08:55:46 +01:00
Antonio Scandurra
3117554568 Automatically unfollow when editing, scrolling or changing selections 2022-03-22 09:17:01 +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
Max Brunsfeld
48848de82c Store settings as a global via a gpui app_state 2022-03-11 15:58:58 -08:00
Max Brunsfeld
f32107eb8e Always refresh the windows when the settings change 2022-03-10 15:34:04 -08:00
Keith Simmons
5aad1ff788 formatting fixes 2022-03-09 10:42:27 -08:00
Keith Simmons
853acccbc2 Make theme selector match other selector styling 2022-03-09 10:40:30 -08:00
Keith Simmons
99e34db0ec ensure that we set original theme when dismissing theme selector and fix some minor edge cases 2022-03-09 10:34:52 -08:00
Keith Simmons
b440a51675 Make theme selector eagerly display the selected theme 2022-03-08 18:42:31 -08:00
Max Brunsfeld
05df1dfae9 Disable doctests for all libraries
We don't use them, and they add a lot of noise to the test output
when running all tests in the workspace.
2022-03-03 16:15:56 -08:00
Max Brunsfeld
47b654063e Provide editor styling information separately from editor settings
* Since regular editors' font sizes and families are controlled by
  the settings and not the theme, don't store a dummy text style in
  the theme. Instead, only store a font color, and synthesize
  the text style for regular editors using both the theme and the
  settings.
* Style single-line and auto-height editors (now called "field
  editors") using a single function that takes the entire theme and
  selects a relevant sub-object.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-24 16:42:00 -08:00
Antonio Scandurra
e7d4c385d5 Take an Into<AnyViewHandle> in ChildView::new
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-27 17:54:45 +01:00
Max Brunsfeld
0e55f0ccaa Use Rust 2021 edition in all crates
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 12:50:31 -08:00
Max Brunsfeld
b7561c6cef Add select_first and select_last bindings to outline view
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 10:45:37 -08:00
Antonio Scandurra
ce51196eab Center the selected item when updating outline query
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 17:53:06 +01:00
Antonio Scandurra
be24e58926 Associate StringMatchCandidate with an id
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 14:55:03 +01:00
Antonio Scandurra
5e64f1aca8 Report the candidate's index when matching strings 2022-01-13 15:09:27 +01:00
Max Brunsfeld
1f762e482d Unify Flexible and Expanded elements
We'll use the name Expanded for something else now.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 17:29:34 -08:00
Max Brunsfeld
04d577e326 Fix context line handline in project diagnostic view 2021-12-21 11:46:47 -08:00
Max Brunsfeld
466a377e1d Merge branch 'main' into share-project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-20 11:42:59 -08:00
Nathan Sobo
ca0d7e5e1f Add journal crate and move supporting logic into workspace crate
I needed to interact with the workspace to open a file from the journal crate, so I moved a bunch of logic out of main related to opening new workspaces and paths.
2021-12-18 08:12:59 -07:00
Max Brunsfeld
fb492a9fb8 Correctly incorporate editor settings into diagnostic header rendering 2021-12-16 16:36:33 -08:00
Nathan Sobo
6c5b27af1d Group diagnostics by primary
Render primary message above the excerpt and supporting messages as block decorations with a `Below` disposition. This is still super rough.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-14 18:26:42 -07:00
Nathan Sobo
1445ce10b5 Name the root file of every crate after the crate to ease navigation
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:46:39 -07:00
Antonio Scandurra
93de2bcfed Allow overriding editor settings on a per-language basis 2021-11-29 09:39:13 +01:00
Antonio Scandurra
2280c75103 Extract theme_selector into its own crate 2021-10-05 15:38:25 +02:00