Commit Graph
936 Commits
Author SHA1 Message Date
Nathan Sobo 03993ea719 Rename SumTree::push_tree to ::append (#2626)
This is something I've been meaning to rename in SumTree. Was looking at
the code and figure why not now.
2023-06-20 08:37:55 -06:00
JuliaandAntonio Scandurra dc07b60e40 Avoid assigning NSCursor style when it already is that style
This avoids a high cost which appears to be the system rasterizing the
cursor every time we call this, fixes a slowdown when scrolling rapidly
while mouse motion continually attempted to assign the style

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-06-20 09:31:30 -04:00
Nathan Sobo 8c298a9da5 Rename SumTree::push_tree to ::append 2023-06-19 19:49:33 -06:00
Piotr Osiewicz 2a3c660d1f settings: accept trailing commas (#2606)
Z-2357

I've found a crate that handles both comments and trailing commas in
JSON. It is a fork of `serde_json`, but it is maintained & up-to-date.
Sadly RawValue seems to not play nicely with it; I've ran into
deserialisation issues around use of RawValue. For this PR I've migrated
to `Value` API.

Obviously this is just a point of discussion, not something I'd merge
straight away. There may be better solutions to this particular problem.

I've also noticed that `serde_json_lenient` does not handle trailing
commas after bindings array. I'm not sure how big of an issue that is.

Release Notes:
- Improved handling of trailing commas in settings files.
[#1322](https://github.com/zed-industries/community/issues/1322)
2023-06-19 18:29:03 +02:00
Julia 6b89243902 Update rust-bindgen dev-dependencies (#2563)
I did \*something\* Friday afternoon which changed something about my
system SDK to break the `media` crate's bindings generation. Some of the
types and consts were not being generated despite being able to prove
that they exist in the source, such as when running the header through
the preprocessor myself and feeding that through the generator. Updating
my OS, XCode, command line tools, and reinstalling Rust as well as
working from fresh clones of the repo had no effect.

Updating rust-bindgen resolved the issue and downgrading the version
back to the original version caused the issue to reappear. I'm still not
sure what happened to change the SDK but at this point with being able
to build the project again I'm not going to look a gift horse in the
mouth.

Release Notes:

- N/A
2023-06-05 09:21:07 -04:00
Antonio Scandurra c872f581d1 Query rect_for_text_range on focused view instead of root element
This was causing IME input to be drawn in the wrong place when there
were splits or panels in the window.
2023-06-05 12:00:40 +02:00
Julia 5790d6993e Update rust-bindgen dev-dependencies 2023-06-04 23:34:22 -04:00
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
JuliaandNathan Sobo 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 ScandurraandAntonio 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 BulatovandAntonio 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 475fc409232775d83797215870256fd5772e299f 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 MakiandAntonio 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