Commit Graph

238 Commits

Author SHA1 Message Date
Nate Butler
ca2052b0c1 Merge branch 'main' into completions-styles 2023-11-27 19:22:07 -05:00
Conrad Irwin
107c3d7f67 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
Conrad Irwin
82f6f77117 Use editor's overlay implementation 2023-11-27 11:49:51 -07:00
Conrad Irwin
212d9254e1 Merge branch 'main' into completions-styles 2023-11-27 11:49:39 -07:00
Conrad Irwin
7a8aba329b Break content mask for hoverables 2023-11-27 11:43:14 -07:00
Antonio Scandurra
3ea12ad0d7 Remove commented out code 2023-11-27 19:19:56 +01:00
Antonio Scandurra
fc4b621b32 Use element_hover instead of red 2023-11-27 19:16:06 +01:00
Antonio Scandurra
8c53f1b9c2 Uncomment hover popover tests 2023-11-27 19:14:58 +01:00
Antonio Scandurra
1e6214440d Show diagnostic hover popover 2023-11-27 19:08:25 +01:00
Antonio Scandurra
a5951df21f Start on hover popover 2023-11-27 18:56:37 +01:00
Nate Butler
8a35a02863 Checkpoint - try using overlay for completions popover
[no ci]
2023-11-27 11:22:19 -05:00
Nate Butler
1acc6b462f Start on completions styles 2023-11-27 10:29:29 -05:00
Antonio Scandurra
3ba5dbb9e8 Prevent mousedown on docs from being propagated to the editor 2023-11-27 15:15:57 +01:00
Antonio Scandurra
eb647be685 Pass max height manually 2023-11-27 14:56:46 +01:00
Antonio Scandurra
0baa9a782b Start on wiring up render_parsed_markdown 2023-11-24 17:28:59 +01:00
Antonio Scandurra
d31b53b912 Extract a gpui::combine_highlights function 2023-11-24 16:31:38 +01:00
Antonio Scandurra
e5b6b0ee9e WIP 2023-11-24 15:05:04 +01:00
Antonio Scandurra
19bfed165b Show single-line docs in autocomplete and apply completion on mousedown 2023-11-24 13:22:25 +01:00
Antonio Scandurra
54357d6553 Syntax highlight completions 2023-11-24 13:10:56 +01:00
Antonio Scandurra
bf39968105 Return TextRuns in combine_syntax_and_fuzzy_match_highlights 2023-11-24 13:00:20 +01:00
Antonio Scandurra
510320bb47
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
7eeb8078f6 Allow setting text background color via TextStyle 2023-11-23 19:22:18 +01:00
Kirill Bulatov
df7b89b6cb
Allow to include gitignored files into project search (#3394) 2023-11-23 19:28:11 +02:00
Antonio Scandurra
3b918bfee8 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
eee63835fb Exclude more ignored/worktree-less/project-less buffers from inlay hint requests 2023-11-23 10:30:52 +02:00
Julia
37e3cc1291 zed2(ish) Cancel completion resolution when new list 2023-11-22 16:26:27 -05:00
Nathan Sobo
c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Antonio Scandurra
524f892fb0 Correctly swap position of context menu 2023-11-22 19:02:44 +01:00
Antonio Scandurra
8aaa46a1b6 Track scroll in editor's context menu 2023-11-22 17:58:00 +01:00
Antonio Scandurra
2b6e8de11f Don't perform wrapping in completions 2023-11-22 14:23:09 +01:00
Antonio Scandurra
3a8e9b5697 Avoid holding borrow to editor while painting child elements 2023-11-22 11:40:38 +01:00
Antonio Scandurra
f2c63781f9 Merge branch 'main' into editor2-autocomplete
# Conflicts:
#	crates/editor2/src/editor.rs
2023-11-21 17:43:09 +01:00
Nate Butler
453aa5ffd7 TextColor -> Color 2023-11-21 01:05:29 -05:00
Piotr Osiewicz
54a3b56935 Merge remote-tracking branch 'origin/callback-handles' into search2 2023-11-21 00:40:20 +01:00
Mikayla
2c4d83c9af
WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Piotr Osiewicz
d60855b06d Merge branch 'main' into search2 2023-11-20 19:23:35 +01:00
Piotr Osiewicz
07cc5904f8 Merge branch 'main' into search2 2023-11-20 18:37:41 +01:00
Piotr Osiewicz
3d28495c67 fixup! Remove dbg statements 2023-11-20 18:35:39 +01:00
Piotr Osiewicz
c1f0ac30a0 Fix up tests once and for good 2023-11-20 18:24:37 +01:00
Conrad Irwin
f86480ba5d Merge followup mess 2023-11-20 09:58:05 -07:00
Conrad Irwin
0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Joseph T. Lyons
8e612e4287 Restore commented-out code 2023-11-19 22:00:01 -05:00
Joseph T. Lyons
3abd376d6a Add timestamp delta to telemetry events 2023-11-19 21:52:28 -05:00
Nathan Sobo
33cd6f520a Clean compile with redesigned element traits 2023-11-18 21:51:47 -07:00
Nathan Sobo
0673606de8 WIP 2023-11-18 20:22:43 -07:00
Nathan Sobo
adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Nathan Sobo
2515bbf990 Move self in Element::paint
Remove mutable state borrows in favor of state ownership in render processes to streamline element rendering.
2023-11-17 23:32:55 -07:00
Nate Butler
d6f173866e Use muted color for fold indicators 2023-11-18 01:02:40 -05:00
Julia
3655a96e54 Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:32:35 -05:00
Julia
c6d22af416 Get diagnostic2 tests building and running 2023-11-17 16:32:35 -05:00