Commit Graph
810 Commits
Author SHA1 Message Date
Max Brunsfeld a3c414bfc4 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 786a87bcfa 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 2d723723b8 Merge branch 'main' into cancel-buffer-search 2022-04-11 17:38:26 -07:00
Max Brunsfeld 07ff10a699 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 e0cc479823 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
Keith Simmons 60c68ac592 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
Keith Simmons 9931a12de1 Handle editor cancel in pane in order to dismiss find toolbar 2022-04-11 15:11:23 -07:00
Keith Simmons 74068b292a Reraise editor events in Project Search and activate workspace item from them 2022-04-11 10:13:07 -07:00
Max Brunsfeld 382f3b7acc Load project and buffer search key bindings from JSON file 2022-04-10 11:30:08 -07:00
Max Brunsfeld 0908a8799c 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
0cf9925cb1 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 b6f15ecc50 Tab size is pulled properly from settings instead of hardcoded 2022-04-06 10:23:37 -07:00
Max BrunsfeldandKeith Simmons dce66e6f9e Move Settings to its own crate
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:23:33 -07:00
Antonio Scandurra cc11f45a1a Introduce workspace::Item::reload to manually trigger a reload 2022-04-01 14:02:49 +02:00
Antonio Scandurra dddbf20c75 Let toolbar items specify flex when they have a primary location 2022-04-01 10:55:38 +02:00
Antonio Scandurra 52f1207b9b Hide breadcrumbs when project search has no results 2022-04-01 10:00:21 +02:00
Antonio Scandurra d89a7f6c2a Fix styling of project search bar 2022-04-01 09:59:36 +02:00
208c8d620d 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
42203752e5 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 ScandurraandNathan Sobo 04d1c52456 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 9654622f2c Revert deletion of FindEditor in theme 2022-03-30 13:35:17 +02:00
Antonio Scandurra cd43c2eb06 Fix buffer search unit tests 2022-03-30 13:18:31 +02:00
Antonio Scandurra 03753ed160 Render project search query editor in toolbar 2022-03-29 17:04:39 +02:00
Antonio Scandurra e933c5430c Embed match index inside of search query editor 2022-03-29 15:53:36 +02:00
Antonio Scandurra 3ad8960aab Honor SearchBar being dismissed when changing the active item 2022-03-29 15:08:33 +02:00
Antonio Scandurra 3e3af591d7 Restructure Pane to have a single Toolbar with multiple items 2022-03-29 11:48:21 +02:00
Nathan Sobo 28251eba43 Merge branch 'main' into unfold-on-select-match 2022-03-24 14:13:27 -06:00
Nathan Sobo 77a4829660 Merge pull request #672 from zed-industries/fix-unfollowing-on-edit
Automatically unfollow leader only for edits that originate from the follower editor
2022-03-24 13:26:28 -06:00
Keith SimmonsandNathan Sobo 1eacdcf00a Remove result from anchor cmp functions
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 11:48:31 -07:00
Antonio Scandurra 47416066c4 Unfold range when selecting the next match
Selected matches are unfolded when in project search, buffer search and
when hitting `cmd-d` to select the next match.
2022-03-24 17:16:21 +01:00
Antonio Scandurra a0ca4a13f8 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 27fbbeffe9 WIP 2022-03-23 19:05:46 +01:00
Antonio Scandurra 0de3f0980f Automatically unfollow when editing, scrolling or changing selections 2022-03-22 09:17:01 +01:00
Max BrunsfeldandAntonio Scandurra 41d2ba294f 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
Antonio ScandurraandNathan Sobo 0060010783 Add Editor::for_multibuffer and repurpose Editor::for_buffer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:39:02 +01:00
Antonio ScandurraandNathan Sobo e158b79115 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 60c4428900 Rename ItemView to Item 2022-03-17 11:32:46 +01:00
Antonio Scandurra e2c28d19d1 Finish refactoring of how editors are opened 2022-03-17 11:29:46 +01:00
Nathan SoboandMax Brunsfeld e5b82e80da WIP: Massage opening of editors
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-16 17:40:09 -06:00
29ab1f30bc 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
4c7d18530a 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 836480a3e3 Merge branch 'main' into settings-file 2022-03-13 10:43:23 -07:00
Max Brunsfeld d2a4b6888c Store settings as a global via a gpui app_state 2022-03-11 15:58:58 -08:00
Nathan Sobo 150fdc71af Start on text highlight support 2022-03-09 20:51:35 -07:00
111d5305ea Remove language servers from buffers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-08 15:16:07 -08:00
Antonio ScandurraandMax Brunsfeld 819bf72dfc Rename weak to visible
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-02 14:38:16 -08:00
Antonio Scandurra 79568c471a Pass a reference to TestAppContext in tests
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Antonio Scandurra 501f06154f Add unit test for project search 2022-02-28 11:10:22 +01:00
Antonio Scandurra 1a59cfc89a Extract a common match_index_for_direction and active_match_index 2022-02-28 10:34:11 +01:00
Nathan Sobo 7cfe2c22ec Fix warning 2022-02-27 18:17:15 -07:00