Commit Graph
381 Commits
Author SHA1 Message Date
Kirill Bulatov ab027aa72e Rework the way project panel auto reveals entries
* gitignored entries are never auto revealed
* `project_panel::auto_reveal_entries = true` settings entry was added,
setting it to `false` will disable the auto reveal
* `pane::RevealInProjectPanel` action was added that activates the project panel and reveals the entry it got triggered on (including the gitignored ones)
2023-12-12 11:38:51 +02:00
Marshall Bowers cf46241ea0 Adjust scrollbar track background and border colors (#3596)
This PR adjusts the colors we pull from the VS Code themes to use for
the scrollbar track background and border.

For the scrollbar track background we now use the `editor.background`,
and for the scrollbar track border we use `editorOverviewRuler.border`.

Release Notes:

- N/A
2023-12-11 17:08:39 -05:00
Conrad Irwin 8aaf5eab9a vim2 (#3594)
- First round of vim tests

Add `observe_keystrokes` back to gpui2
Allow multiple actions to match a given key event

[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2023-12-11 15:06:51 -07:00
Marshall Bowers 23d774a230 Draw the scrollbar track left border 2023-12-11 16:39:00 -05:00
Mikayla Maki b49faf2673 Add support for resizing splits and docks, as well as utilities (#3595)
Making this PR to upstream changes to util and GPUI2, resizing exists
but isn't working yet.

Release Notes:

- N/A
2023-12-11 13:32:06 -08:00
Conrad Irwin 287fdcbf9e First round of vim tests 2023-12-11 14:16:25 -07:00
Marshall Bowers 53b76a6dd2 Fix inactive tab styles (the verbose way) (#3591)
This PR fixes the inactive tab style to properly show the label using
the muted text color.

I went about fixing this in the most direct way possible, but the
solution leaves a lot to be desired, IMO. I plan to explore some ideas
on how we can improve the state of styling the tab content without
having the same styles repeated all over the place and subsequently
out-of-sync.

Release Notes:

- N/A
2023-12-11 15:42:17 -05:00
Conrad Irwin 547c4cebb8 vim-flight entertainment (#3574)
- vim2 compiling (but mostly commented out)
- More code written, similar lack of workingness so far

Still todo:
[ ] Figure out the focus/blur stuff
[ ] Uncoment more code
[ ] Fix VimTestContext
[ ] Uncomment the tests

Release Notes:

- N/A
2023-12-11 12:11:13 -07:00
Marshall Bowers d83c40c77f Fix color for selections in scrollbar (#3590)
This PR fixes an issue where we weren't using the right color for
displaying selections within the scrollbar.

Release Notes:

- N/A
2023-12-11 13:34:29 -05:00
Mikayla fa73bc8748 Merge branch 'main' into splits 2023-12-11 10:16:32 -08:00
Marshall Bowers b1330f68e8 Style scrollbar when using diff markers 2023-12-11 12:58:55 -05:00
Marshall Bowers f294387f7d Pull scrollbar colors from theme 2023-12-11 12:47:29 -05:00
Conrad Irwin 3ae69b7596 Remove warnigns 2023-12-11 10:45:27 -07:00
Conrad Irwin 0d96e964ef Merge branch 'main' into vim2 2023-12-11 09:38:23 -07:00
Piotr Osiewicz ba57516632 Merge branch 'main' into project_search2 2023-12-11 16:47:48 +01:00
Antonio Scandurra 0d2780b508 Fix porting mistake that caused clicking on the editor to misbehave
We used `width` instead of `height` in the "pixels-to-point" conversion
code, which would cause clicks to not work correctly when the width was
smaller than the `y` coordinate.
2023-12-11 14:21:55 +01:00
Kirill Bulatov 42acd6431f Finalize the command 2023-12-11 12:28:22 +02:00
Kirill Bulatov 50e2f5c886 Draft an expand macro recusively command 2023-12-11 12:28:22 +02:00
Antonio Scandurra 135c16c158 Listen for mouse events on scrollbar 2023-12-11 10:33:05 +01:00
Antonio Scandurra 5eec1221cb Merge remote-tracking branch 'origin/main' into scrollbars2 2023-12-11 09:51:43 +01:00
Conrad Irwin 44a660dc78 actions3 (#3578)
- Restore impl_actions! and remove derive(Action)

Originally in gpui2 we inferred the action's namespace from the module
it was
defined in. This worked most of the time (ignoring the "remove_the_2"
hack),
but caused unintended (and mostly invisible) behavior in crates with
multiple
modules.

#3577 restored the namespace parameter to actions!, and this PR
reintroduces
`impl_actions!` to do the same for non-unit structs.

I considered trying to keep the struct-attribute API work, because it
does feel
more stylistically appropriate for rust, but two problems lead to it
feeling less good than `impl_actions!` in practice:
1. You have to repeat the namespace for each struct (and usually you're
defining them all in the same namespace)
2. You can't pass an argument to a derive macro inline, you need to use
an attribute instead.


Release Notes:

- N/A
2023-12-10 19:59:53 -07:00
Conrad Irwin aed17f4763 Restore impl_actions! and remove derive(Action) 2023-12-10 19:33:38 -07:00
Conrad Irwin 9761adb159 Restore namespace parameter to actions! (#3577)
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.

Although automatically deriving the namespace worked in many situations,
it was
unclear what to do with nested modules. Vim wanted all actions to be
registered
under vim, while collab_ui wanted one namespace per action.

It seems better to make the implicit explicit, and give the flexibility
to hide
implementation details from the end-users.

Release Notes:

- N/A
2023-12-09 15:27:17 -07:00
Conrad Irwin 9befa3f9ca Restore namespace parameter to actions!
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Max Brunsfeld b72f66fae8 Paint code-action/fold buttons above the gutter 2023-12-09 11:41:40 -08:00
Conrad Irwin 9f467fba9f More code written, similar lack of workingness so far 2023-12-08 17:45:17 -07:00
Mikayla 70c64c8a3f Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Marshall Bowers a8c4edf312 Use the diff status colors defined in the theme (#3569)
This PR updates the diff status colors to use the ones defined in the
theme instead of placeholder colors.

Release Notes:

- N/A
2023-12-08 17:41:11 -05:00
Conrad Irwin e356a7df09 vim2 compiling (but mostly commented out) 2023-12-08 18:47:14 +00:00
Antonio Scandurra cb29eb0fea 🎨 2023-12-08 14:24:58 +01:00
Antonio Scandurra e759da1480 Paint scrollbars
We still need to wire up mouse listeners.
2023-12-08 14:17:38 +01:00
Piotr Osiewicz 95814ab53b Barebones project search (no UI, but the crate compiles) 2023-12-07 14:36:45 +01:00
Antonio Scandurra 67a00e0920 Fix confirming rename not working on editor2 2023-12-07 12:54:28 +01:00
Joseph T. Lyons df84b9d94e Remove remnants from conflict resolution (#3528)
Fixes a couple of things that slipped through when going through the
last merge conflict

Release Notes:

- N/A
2023-12-06 23:44:49 -05:00
Joseph T. Lyons 263b79c047 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Mikayla 8d491f7e44 Merge branch 'main' into terminal-element 2023-12-06 15:20:04 -08:00
MikaylaandNathan b945e33e53 Fix a porting bugs for terminal2
co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 15:11:49 -08:00
Joseph T. Lyons a364c9ed70 WIP 2023-12-06 17:27:10 -05:00
Max BrunsfeldandNathan 5392e6ca24 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Kirill Bulatov 15bdf7622d Use a better name for zed2 inlay style field 2023-12-06 22:06:30 +02:00
Kirill Bulatov 98a9733d16 Pass proper theme colors for inlays and suggestions (#3517)
<img width="1728" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/f6f1e24f-71fe-4a2e-9bcf-9e98861c0da4">


![image](https://github.com/zed-industries/zed/assets/2690773/8434d8a1-ee7e-49c1-9e88-362363225d96)

Now inlays are visible in all zed2 themes, but 
* always have a blue color which is the same as some theme colors
* not other hint-related style changes like font width, background, etc.
seem to exist in the theme, ergo not propagated.

In general though, people want those style changes applied to their
hints, so we might want to do something about it later.
I've left a `// todo!("what about the rest of the highlight style parts
for inlays and suggestions?")` in the corresponding places for that.

Release Notes:

- N/A
2023-12-06 21:54:41 +02:00
Nathan Sobo 8b0a073611 Document geometry module and replace zero method with default (#3515)
Nothing earth-shattering here, but all our geometry types are now fully
documented.

Release Notes:

- N/A
2023-12-06 12:52:41 -07:00
Kirill Bulatov c5bcd65546 Pass proper theme colors for inlays and suggestions 2023-12-06 21:48:39 +02:00
Nathan Sobo 09b6840b92 Document geometry 2023-12-06 12:28:44 -07:00
Joseph T. Lyons c6e2d20500 WIP 2023-12-06 14:13:44 -05:00
Antonio ScandurraandMarshall a82902714b Paint blocks on top of the editor
This ensures blocks get mouse events before the editor beneath
them.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 19:15:09 +01:00
Antonio Scandurra c62305edea Merge remote-tracking branch 'origin/main' into assistant-2
# Conflicts:
#	crates/ui2/src/components/icon.rs
2023-12-06 18:18:58 +01:00
Antonio Scandurra f5edae4353 Introduce app menus in zed2 (#3511)
Release Notes:

- N/A
2023-12-06 18:17:02 +01:00
Marshall Bowers 2191cb7f3b Factor out LabelLike to share common label styles (#3510)
This PR factors out a new `LabelLike` component to share common styles
between the `Label` and `HighlightedLabel` components.

Release Notes:

- N/A
2023-12-06 11:17:12 -05:00
Piotr Osiewicz 065df46d32 Merge branch 'main' into app-menus 2023-12-06 16:34:55 +01:00