Commit Graph
180 Commits
Author SHA1 Message Date
Max Brunsfeld d03a77bbf4 Get following working
Restore a single event type on Item trait, so that the workspace can
subscribe to it and handle following events.
2023-12-05 12:57:23 -08:00
Marshall Bowers 886f309729 Merge branch 'main' into editor2_tests 2023-12-04 14:09:23 -05:00
Marshall Bowers 38c7241da1 Add support for copying diagnostic messages to the clipboard (#3489)
This PR adds support for copying diagnostics messages to the clipboard.

This was already working, but we were missing implementations
clipboard-related methods in the `TestPlatform` that were causing the
tests to fail when the copying functionality was added.

Release Notes:

- N/A
2023-12-04 14:08:05 -05:00
Marshall Bowers 1172e4c84b Format code 2023-12-04 11:57:10 -05:00
Marshall Bowers 9d6a58fdd1 Merge branch 'main' into diagnostics-style-2 2023-12-04 11:56:55 -05:00
Nate ButlerandMarshall Bowers 5cd08b060b Mark copy button as incomplete
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:53:46 -05:00
Nate ButlerandMarshall Bowers 0677eb806f Update diagnostic style
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:50:26 -05:00
Nate ButlerandMarshall Bowers 199c84fe43 Fix ci error – Copy to clipboard isn't implemented in tests
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:41:31 -05:00
Piotr OsiewiczandAntonio 23167550d9 Add simulate_window_resize.
Fixes up tests for movement in editor/scrolling.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-04 17:27:48 +01:00
Piotr OsiewiczandAntonio cee41d0c23 Fix disparity between editor2 and edito1 wrt copilot completions.
Fixes test test_copilot.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-04 16:39:40 +01:00
Conrad Irwin 94e188da8f Language Selector 2 working! 2023-12-01 21:23:20 -07:00
Nate Butler 45b93a6903 Re-add diagnostic headers 2023-12-01 15:30:01 -05:00
Julia 46e8e35f4d Merge branch 'main' into zed2-breadcrumbs 2023-12-01 11:02:34 -05:00
Antonio ScandurraandPiotr 1d8623c379 Add mouse context menu to editor2
Co-Authored-By: Piotr <piotr@zed.dev>
2023-12-01 16:01:56 +01:00
Antonio Scandurra c195daa651 Respond to modifiers changed event in editor2 and set cursor 2023-12-01 14:26:49 +01:00
Antonio Scandurra 603181a09c Remove all todos in Editor's Item implementation 2023-12-01 12:32:30 +01:00
Antonio Scandurra c29b7af449 Register NewFile and NewFileInDirection from Editor 2023-12-01 12:11:54 +01:00
Antonio Scandurra 422b8559ed Re-enable opening excerpts in Editor 2023-12-01 12:03:21 +01:00
Antonio Scandurra c518916af2 🔥 2023-12-01 11:53:47 +01:00
Antonio Scandurra df8dcd42dc WIP 2023-11-30 18:00:41 +01:00
Julia e320627bd9 Merge branch 'main' into zed2-breadcrumbs 2023-11-30 11:38:29 -05:00
Max Brunsfeld a694715cc8 Address some TODOs in editor2 crate (#3445)
* Fix crash when jumping to definition
* Enabling resolution of completions
* Make links in interactive text clickable
* Enable code paths that use `select_anchors`
2023-11-29 16:32:02 -08:00
Marshall Bowers b0bc31b883 Add new Button and IconButton components (#3448)
This PR adds new `Button` and `IconButton` components built on top of
our new button abstractions.

Both of these buttons are built from the common `ButtonLike` base, and
implement the `ButtonCommon` (name TBD) trait in order to provide a
common interface.

There are still some visual tweaks that we'll need to make to the new
buttons, but those should be straightforward to make after we land this.

Release Notes:

- N/A
2023-11-29 17:41:44 -05:00
Max Brunsfeld c97c407d1c Implement completion-resolution in editor2
Enable the completion tests in editor2.
2023-11-29 14:20:47 -08:00
Max Brunsfeld 13201a5c0f Use pointer cursor style for clickable ranges in InteractiveText 2023-11-29 12:42:09 -08:00
Nate Butler 88aefa344a Merge branch 'main' into completions-styles 2023-11-27 19:22:07 -05:00
Conrad Irwin 54793808a6 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
JuliaandMax Brunsfeld 54a1ef9697 zed2: Mostly port breadcrumbs & improve StyledText api
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-11-27 16:09:31 -05:00
Conrad Irwin 501d6f16f9 Use editor's overlay implementation 2023-11-27 11:49:51 -07:00
Conrad Irwin 87e2899002 Merge branch 'main' into completions-styles 2023-11-27 11:49:39 -07:00
Antonio Scandurra 5cb61e69bd Start on hover popover 2023-11-27 18:56:37 +01:00
Nate Butler bbd52e9f26 Checkpoint - try using overlay for completions popover
[no ci]
2023-11-27 11:22:19 -05:00
Nate Butler de108334cb Start on completions styles 2023-11-27 10:29:29 -05:00
Antonio Scandurra b010dedcc5 Prevent mousedown on docs from being propagated to the editor 2023-11-27 15:15:57 +01:00
Antonio Scandurra 067e9244f9 Pass max height manually 2023-11-27 14:56:46 +01:00
Antonio Scandurra 04a30cbbb7 Start on wiring up render_parsed_markdown 2023-11-24 17:28:59 +01:00
Antonio Scandurra e5fc79b768 Extract a gpui::combine_highlights function 2023-11-24 16:31:38 +01:00
Antonio Scandurra e570add4cf WIP 2023-11-24 15:05:04 +01:00
Antonio Scandurra 7b28cbfe91 Show single-line docs in autocomplete and apply completion on mousedown 2023-11-24 13:22:25 +01:00
Antonio Scandurra 3929532d0f Syntax highlight completions 2023-11-24 13:10:56 +01:00
Antonio Scandurra 78403feee1 Return TextRuns in combine_syntax_and_fuzzy_match_highlights 2023-11-24 13:00:20 +01:00
Antonio Scandurra 0510d63b59 Introduce InteractiveText (#3397)
This new element will let us react to click events on arbitrary ranges
of some rendered text, e.g.:

```rs
InteractiveText::new(
    "element-id",
    StyledText::new("Hello world, how is it going?").with_runs(vec![
        cx.text_style().to_run(6),
        TextRun {
            background_color: Some(green()),
            ..cx.text_style().to_run(5)
        },
        cx.text_style().to_run(18),
    ]),
)
.on_click(vec![2..4, 1..3, 7..9], |range_ix, cx| {
    println!("Clicked range {range_ix}");
})
```

As part of this, I also added the ability to give text runs a background
color.

Release Notes:

- N/A
2023-11-23 19:35:03 +01:00
Antonio Scandurra 11117a43af Allow setting text background color via TextStyle 2023-11-23 19:22:18 +01:00
Kirill Bulatov 7e0e979c7b Allow to include gitignored files into project search (#3394) 2023-11-23 19:28:11 +02:00
Antonio Scandurra 8d1bfd142c Merge branch 'main' into rename-element-traits
# Conflicts:
#	crates/gpui2/src/elements/uniform_list.rs
#	crates/ui2/src/components/context_menu.rs
#	crates/ui2/src/components/list.rs
2023-11-23 12:47:46 +01:00
Kirill Bulatov 794007d171 Exclude more ignored/worktree-less/project-less buffers from inlay hint requests 2023-11-23 10:30:52 +02:00
Julia e3e29009bf zed2(ish) Cancel completion resolution when new list 2023-11-22 16:26:27 -05:00
Nathan Sobo d50a688a33 Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Antonio Scandurra b2fa7da14d Track scroll in editor's context menu 2023-11-22 17:58:00 +01:00
Antonio Scandurra 9a8ba5cabe Don't perform wrapping in completions 2023-11-22 14:23:09 +01:00