Commit Graph

929 Commits

Author SHA1 Message Date
Joseph Lyons
7c60f636d5 Fix typos 2023-06-02 22:02:19 -04:00
Max Brunsfeld
e67e6e6f70 Fix ambiguous glob export warnings in rust 1.70 2023-06-01 14:07:59 -07:00
Julia
31516b7863 TextStyle::default() ask system for known existing font family
Rather than assuming a specific family exists, try a set of specific
names and if they fail, just grab any old font that the system reports
as existing

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-30 14:46:27 -04:00
Max Brunsfeld
2db57b5139 Adjust diagnostic transformation test to not wait for two buffer notifications 2023-05-26 15:47:37 -07:00
Nathan Sobo
0b7d095c0a
Introduce the ability to talk to GPT-4 within buffers on preview and dev (#2524)
This adds basic ability to interact with OpenAI inside a buffer.

Release Notes:

* If`OPENAI_API_KEY` is defined in your environment, you can now run the
`ai: assist` command to pass the text of your current buffer to GPT-4.
If you're editing a file with a `.zmd` extension, you can also invoke
the model with `cmd-enter.` (preview-only)
2023-05-24 12:00:43 -06:00
Nathan Sobo
747322a02d Merge remote-tracking branch 'origin/main' into zmd 2023-05-24 11:04:07 -06:00
Max Brunsfeld
66b3be8687 Make toggle dock actions appear in the command palette 2023-05-24 09:58:41 -07:00
Nathan Sobo
7e6cccfa3d WIP: Stream in completions
Drop dependency on tokio introduced by async-openai and do it ourselves.

The approach I'm taking of replacing instead of appending is causing issues. Need to just append.
2023-05-22 20:28:22 -06:00
Antonio Scandurra
4aa2858b2b Transfer focus to root view only if previously-focused view was dropped 2023-05-22 18:05:08 +02:00
Antonio Scandurra
146809eef0 Merge branch 'main' into panels 2023-05-22 14:10:17 +02:00
Antonio Scandurra
5a8fb18c20 Show workspace only after initializing it 2023-05-19 19:35:00 +02:00
Kirill Bulatov
583b15badc When the file is deleted via project panel, close it in editors 2023-05-19 18:52:30 +03:00
Mikayla Maki
89d8bb1425
WIP: Add persistence to new docks 2023-05-17 17:34:20 -07:00
Max Brunsfeld
1f0e79ee9d Merge branch 'main' into setting-store 2023-05-17 14:56:35 -07:00
Julia
9e5983305b Update font-kit to resolve panics when loading malformed fonts 2023-05-17 13:38:54 -04:00
Max Brunsfeld
89204e85c0 Merge branch 'main' into setting-store 2023-05-17 09:55:24 -07:00
Antonio Scandurra
747fbfadeb Notify old/new ancestors of the focused view when they change 2023-05-17 17:12:12 +02:00
Antonio Scandurra
981129ef8e Show a panel/pane as zoomed only if it's the active item in workspace 2023-05-17 15:06:58 +02:00
Max Brunsfeld
39618ae32d Define language settings in the language crate 2023-05-16 17:29:53 -07:00
Julia
d61b12a05b Disable usvg's text feature flags to include less dependency code 2023-05-16 18:44:16 -04:00
Antonio Scandurra
f87ae6032e Don't rely on action propagation for zooming in and out
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-16 10:34:50 -06:00
Antonio Scandurra
adf361b374 Implement zooming for panes and docks 2023-05-16 11:49:48 +02:00
Kirill Bulatov
18e0ee44a6 Remove redundant scopes and actions to fix the focus toggle on ESC
co-authored-by: Antonio <antonio@zed.dev>
2023-05-15 13:10:15 +03:00
Nathan Sobo
ba50b35de6 wip 2023-05-13 14:34:09 -06:00
Mikayla Maki
41bef2e444
Refactor out git status into FileName component
Integrate file name component into the editor's tab content
2023-05-13 02:26:45 -07:00
Nathan Sobo
bd795d7607 Preserve panel size when re-docking between left and right 2023-05-12 15:15:11 -06:00
Nathan Sobo
214354b4da Make panels independently resizable 2023-05-12 09:44:14 -06:00
Kirill Bulatov
89352a2bdc
Merge pull request #2463 from zed-industries/kb/reapply-modal-accessibility
Reintroduce more accesible modal keybindings
2023-05-12 06:11:04 +03:00
Mikayla Maki
defc9c8591
Merge pull request #2455 from zed-industries/git-status-viewer
Add Git Status to the project panel
2023-05-11 16:13:34 -07:00
Kirill Bulatov
f12dffa60c Reintroduce more accesible modal keybindings
Brings commit 475fc40923 back
2023-05-11 20:59:10 +03:00
Joseph Lyons
0ab94551f4 Revert "More keybindings in macOs modals with buttons"
This reverts commit 1398a12062.
2023-05-11 11:37:34 -04:00
Petros Amoiridis
21e1bdc8cd
Fix yellow to be yellow 2023-05-10 17:37:36 -07:00
Max Brunsfeld
cee7edabf9 Ensure the SettingsStore global is added in tests 2023-05-10 16:39:59 -07:00
Antonio Scandurra
9b9d53fcf8 Focus the root view if the previously-focused view isn't rendered 2023-05-10 15:40:46 +02:00
Nathan Sobo
0d78266ddb Replace todo with unimplemented to reduce distractions 2023-05-09 16:41:10 -06:00
Mikayla Maki
8d561d6408
Make dock not eagerly steal focus from sub items 2023-05-09 12:00:09 -07:00
Mikayla Maki
3570810516
Add API for accessing git branch 2023-05-08 14:33:58 -07:00
Mikayla Maki
2cf928c85a
Fixed clicks falling through the modal terminal
co-authored-by: Antonio <antonio@zed.dev>
2023-05-08 10:54:12 -07:00
Kirill Bulatov
706f6f495a Add a test 2023-05-08 19:36:51 +03:00
Kirill Bulatov
714734d279 Add whitespaces rendering 2023-05-08 19:36:51 +03:00
Kirill Bulatov
2d8c88ad73 Draw tabs with svg icons in editor code only 2023-05-08 19:36:51 +03:00
Kirill Bulatov
f0a88b3337 Make invisibles display configurable 2023-05-08 19:36:51 +03:00
Kirill Bulatov
ad731ea6d2 Draft invisibles' tabs display 2023-05-08 19:36:51 +03:00
Antonio Scandurra
080a1f00a3 Delay focus_in event for window activation till after layout 2023-05-05 10:47:42 +02:00
Antonio Scandurra
b9ed327b94 Replace usages of is_parent_view_focused with is_self_focused
Previously, this was used because we didn't have access to the current
view and `EventContext` was an element-only abstraction. Now that the
`EventContext` wraps the current view's `ViewContext` we can simply check
for the view's focus and avoid querying ancestors.
2023-05-05 10:08:22 +02:00
Antonio Scandurra
80ad59a620 Make focusing the parent an effect to avoid querying ancestors 2023-05-05 10:04:54 +02:00
Antonio Scandurra
da19edc3e3 Merge branch 'main' into implicit-ancestry 2023-05-04 14:39:58 +02:00
Antonio Scandurra
5cc6304fa6 Verify keystrokes can be queried while views are on the stack 2023-05-04 12:09:32 +02:00
Antonio Scandurra
3d679ddb26 Avoid re-allocating KeymapContext after every view notification 2023-05-04 12:04:30 +02:00
Antonio Scandurra
18e39ef2fa Cache view's type id and keymap context into a separate map
During `layout`, we now pass a mutable reference to the element's
parent view. This is a recursive process that causes the view to
be removed from `AppContext` and then re-inserted back into it once
the layout is complete.

As such, querying parent views during `layout` does not work as such
views will have been removed from `AppContext` and not yet re-inserted
into it. This caused a bug in `KeystrokeLabel`, which used the `keystrokes_for_action`
method to query its ancestors to determine their type id and keymap context.

Now, any time a view notifies, we will cache its keymap context so that
we don't need to query the parent view during `layout`.
2023-05-04 10:47:56 +02:00