Commit Graph
89 Commits
Author SHA1 Message Date
Antonio Scandurra ce06f5ef2a Pretty-print JSON of server snapshot 2022-05-26 09:34:39 +02:00
Max BrunsfeldandNathan Sobo 65c8bea372 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
Max Brunsfeld 259d76aa40 Start work on handling multibuffers properly when closing unsaved buffers 2022-05-22 16:48:33 -07:00
Max Brunsfeld e6011794ca 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
Keith Simmons b03abdb6df Reduce accessibility of multibuffer read to reduce risk of borrowing snapshot and buffer refcells twice 2022-05-13 16:58:30 -07:00
Keith Simmons c95f74648a Rename selected_ranges and selected_display_ranges to remove redundant selected 2022-05-13 15:55:27 -07:00
Keith Simmons 2a984285a2 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons 851e04d46b Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons 9b46bb0ee6 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00
Antonio Scandurra 58367fccfb WIP 2022-05-05 15:15:58 +02:00
Max Brunsfeld a95bc19817 Abstract more local project setup inside Project::test helper 2022-05-04 10:28:09 -07:00
Keith Simmons 94b6f4beb5 Merge pull request #929 from zed-industries/non-uniform-batched-edits
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Keith Simmons 47d4f42467 Consolidate edit and edit_batched functions 2022-04-28 16:52:04 -07:00
Max Brunsfeld 30aa7064f0 🎨 Use Interactive wrapper for search option buttons 2022-04-28 15:29:03 -07:00
Keith Simmons 5051769dd3 Building, but failing test WIP 2022-04-27 17:25:38 -07:00
Max Brunsfeld f6cdcbefdc Reuse Confirm action in chat panel, go-to-line, and project search 2022-04-21 15:24:05 -07:00
Nathan Sobo beb2ec9065 Merge pull request #822 from zed-industries/focus-project-search-query
Fix focus bugs in `ProjectSearchView`
2022-04-14 12:25:59 -06:00
Max Brunsfeld d0089e79ef Merge pull request #817 from zed-industries/dynamic-editor-highlights
Store accessors for editor highlight colors not colors themselves
2022-04-14 10:36:38 -07:00
Antonio Scandurra a70882b79c Persist project search focus state
...so that we can re-focus the previously-active editor when switching back
to the project search tab.
2022-04-14 18:36:42 +02:00
Nathan Sobo e221fb61ac Only process a single focus effect per batch
This allows us to focus the query editor of the project search when deploying it. Previously, a complex interplay between focus events was preventing this from working in an intuitive way. What happened previously:

- We'd activate the project search, which enqueued a focus effect for the project search view
- We'd focus the query editor, which enqueued an effect
- We'd process the focus effect for the search view, which would enqueue an effect to transfer focus to the results editor
- We'd process the effect to focus the query editor
- We'd process the effect to focus the results editor

Now...

- We activate the project search pane item, enqueuing a focus effect for the project search itself
- We focus the query editor and *remove* the previous pending focus change effect
- We process the focus effect
2022-04-14 08:52:24 -06:00
Nathan Sobo 10ee52fa86 Revert "Focus Project Search query editor always when deployed" 2022-04-14 07:53:15 -06:00
Keith Simmons 23737d988d Store accessors for editor highlight colors not colors themselves 2022-04-13 15:30:57 -07:00
Keith Simmons 104841d7f4 Notify when buffer search matches change 2022-04-13 14:49:18 -07:00
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
Max Brunsfeld a4e5dafea4 Merge branch 'main' into load-keymaps 2022-04-11 15:55:10 -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
Nathan Sobo 594bbeb35d Merge pull request #781 from zed-industries/structured-logging
Introduce structured logging
2022-04-09 07:40:24 -06: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
Nathan SoboandAntonio Scandurra 66bcacd9cb 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
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