Commit Graph
669 Commits
Author SHA1 Message Date
Mikayla 58f4efb579 fix default keybindings for select all matches 2023-09-20 17:14:19 -07:00
Conrad Irwin f4d4a2f41b vim fixes for find&replace (#2995)
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext (in vim mode)

Release Notes:

- allow replacement to be empty
2023-09-20 16:42:39 -06:00
Nate Butler f7696114bb Add an initial set of GPUI2 components to the storybook (#2990)
This PR adds an initial set of components to `crates/storybook/src/ui`.

All changes still are contained to inside storybook. Merging to keep up
to date with main.
2023-09-20 13:52:47 -04:00
Kyle Caverly 5fe8aa064f Keyboard navigation and setting persistence for project search (#2996)
Enable keyboard shortcuts for Project Search modes, and ensure project
search settings are persisted search to search.

Release Notes:

- Added alt-cmd-s to Toggle Semantic Search Mode
- Added alt-cmd-g to Toggle Regex Search Mode
- Added alt-cmd-x to Toggle Text Search Mode
- Defaulted new project searches to using last used search mode and
settings.
2023-09-20 12:44:30 -04:00
KCaverly 37a0c6615f remove conditional action registration for activate semantic search mode 2023-09-20 12:38:29 -04:00
Mikayla 8cc7a02390 Fix rebase 2023-09-20 08:34:18 -07:00
Mikayla 03d4191685 Fix infinite loop in select all matches 2023-09-20 08:25:21 -07:00
Mikayla c074bfd441 Add select all command to the editor, equivalent to hitting cmd-d as many times as possible 2023-09-20 08:25:20 -07:00
KCaverly 28ed406d54 add keymaps for activating text, regex and semantic modes 2023-09-20 10:04:43 -04:00
Conrad Irwin 2da664ed17 vim fixes for find&replace
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext
2023-09-19 20:48:01 -06:00
Mikayla Maki e37373a636 Add UI/UX for moving channels (#2976)
TODO:

- [x] Add drag and drop
- [x] Polish up in-flight decisions.
- [x] Fix chat panel panic
- [x] Add nice hover effect highlighting the matching ones
- [x] Fix and test keyboard

Release Notes:

- N/A
2023-09-19 17:56:22 -07:00
Mikayla ac65e7590c Add hover styles to channels matching the current selection
Fix chat desync from moving / linking channels
2023-09-19 17:50:02 -07:00
Nate Butler 26f442a675 Merge branch 'main' into nate/gpui2-ui-components 2023-09-19 00:26:41 -04:00
Conrad Irwin 5c22e40e99 vim: Fix Y on last line (#2975)
For zed-industries/community#2044

Release Notes:

- vim: Fix y in VISUAL LINE mode when last line has no trailing newline
([#2044](https://github.com/zed-industries/community/issues/2044)).
2023-09-18 08:54:48 -06:00
Nate Butler 0aff0c105d Add missing logo_96 icon, fix a few incorrect paths (#2977)
🙈 I missed a few

Thanks @maxbrunsfeld / @mikayla-maki
2023-09-15 14:57:40 -04:00
Nate Butler 9a4ecf0f88 Add missing logo_96 icon, fix a few incorrect paths 2023-09-15 14:21:33 -04:00
Max Brunsfeld b8fd4f5d40 Restore user_group_16 icon 2023-09-15 11:16:30 -07:00
Nate Butler d6f24feb4a WIP 2023-09-15 14:14:28 -04:00
Max Brunsfeld 6c3fd2a687 Merge branch 'main' into chat-again 2023-09-15 11:06:39 -07:00
Nate Butler 4c9100eae3 Unify icons using multiple variants, remove all unused icons (#2974)
There are around ~400 icons in the `assets/icons` folder, but in reality
including file icons we only use around 50. In a number of places we use
different variants of the same icon, even in different styles.

This PR unifies the icons we use, removes the duplicates, and cleans out
unused icons.

Release Notes:

- Made icons more consistent throughout the app.
2023-09-15 13:55:13 -04:00
Conrad Irwin b02bd9bce1 Fix Y on last line with no trailing new line
For zed-industries/community#2044
2023-09-15 11:14:04 -06:00
Nate Butler 24974ee2fa Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
Conrad Irwin 9ef7004383 Add shift-d and shift-x as aliases for d and x in visual mode 2023-09-15 10:26:43 -06:00
Max Brunsfeld 9d8c6a7ed1 Merge branch 'main' into chat-again 2023-09-14 14:50:45 -07:00
Conrad Irwin 06555a423b vim: g s/S for outline/project symbols 2023-09-14 13:49:02 -06:00
Conrad Irwin 329a0724e0 vim counts (#2958)
Release Notes:

- vim: Fix counts with operators (`2yy`, `d3d`, etc.)
([#1496](https://github.com/zed-industries/community/issues/1496))
([#970](https://github.com/zed-industries/community/issues/970)).
- vim: Add support for counts with insert actions (`2i`, `2o`, `2a`,
etc.)
- vim: add `_` and `g_`
2023-09-12 14:32:00 -06:00
Piotr OsiewiczandMax a63b78d5a0 Replace in buffer adjustments (#2960)
This PR addresses feedback from @maxbrunsfeld on new replace in buffer.
It fixes:
- missing padding surrounding replace input.
- missing padding around replace buttons.
- missing `.notify` call which made the replace fields not show up
immediately sometimes.

Release Notes:
- N/A

---------

Co-authored-by: Max <max@zed.dev>
2023-09-12 22:08:39 +02:00
Max Brunsfeld d97c9d8dfd Merge branch 'main' into chat-again 2023-09-12 11:26:54 -07:00
Piotr Osiewicz 4cb8647702 Z 1200/replace in buffer (#2922)
This is still WIP, mostly pending styling. I added a pretty rudimentary
text field and no buttons whatsoever other than that. I am targeting a
Preview of 09.13, as I am gonna be on PTO for the next week.

I dislike the current implementation slightly because of `regex`'s crate
syntax and lack of support of backreferences. What strikes me as odd wrt
to syntax is that it will just replace a capture name with empty string
if that capture is missing from the regex. While this is perfectly fine
behaviour for conditionally-matched capture groups (e.g. `(foo)?`), I
think it should still error out if there's no group with a given name
(conditional or not).
Release Notes:

- Added "Replace" functionality to buffer search.
2023-09-12 18:46:54 +02:00
Conrad Irwin d868d00985 vim: ALlow counts on insert actions
This re-uses the existing repeat infrastructure.
2023-09-11 18:09:47 -06:00
Conrad Irwin cee549e1ef vim: Fix count handling to allow pre/post counts
Fixes 2yy, d3d, etc.

For zed-industries/community#970
For zed-industries/community#1496
2023-09-11 14:35:47 -06:00
Conrad Irwin e8a6ecd6ac Allow a count with CurrentLine
Add _ and g_ too while we're here.
2023-09-11 14:19:43 -06:00
Nathan Sobo fe6f0a253b Merge remote-tracking branch 'origin/main' into chat-again 2023-09-11 12:08:01 -06:00
Nathan Sobo 15ea4af5e7 Merge branch 'main' into storybook 2023-09-11 09:13:46 -06:00
Conrad Irwin ba1c350dad vim: Add ZZ and ZQ
The major change here is a refactoring to allow controling the save
behaviour when closing items, which is pre-work needed for vim command
palette.

For zed-industries/community#1868
2023-09-08 16:25:20 -06:00
Max Brunsfeld ed7bc91dbd Create chat panel settings 2023-09-08 13:28:19 -07:00
Nathan Sobo 362b1a44be Merge branch 'main' into storybook 2023-09-08 14:18:44 -06:00
Nate Butler 5fb9c60905 Checkpoint 2023-09-07 15:33:50 -04:00
Conrad Irwin 8e2e00e003 add vim-specific J (with repeatability) 2023-09-07 11:08:07 -06:00
Conrad Irwin 48bb2a3321 TEMP 2023-09-07 10:51:18 -06:00
Conrad Irwin 1b1d7f22cc Add visual area repeating 2023-09-07 10:45:38 -06:00
Conrad Irwinand 20f98e4d17 vim . to replay
Co-Authored-By: maxbrunsfeld@gmail.com
2023-09-06 13:49:55 -06:00
Conrad Irwin c2c04616b4 vim S (#2929)
Release Notes:
- vim: Add `S` to substitute line ([#1897](https://github.com/zed-industries/community/issues/1897)).
2023-09-05 09:39:08 -06:00
Conrad Irwin 56db21d54b Split ContextMenu actions
This should have no user-visible impact.

For vim `.` to repeat it's important that actions are replayable.
Currently editor::MoveDown *sometimes* moves the cursor down, and
*sometimes* selects the next completion.

For replay we need to be able to separate the two.
2023-09-02 21:04:19 -06:00
Conrad Irwin af12977d17 vim: Add S to substitute line
For zed-industries/community#1897
2023-09-01 13:13:59 -06:00
Kirill Bulatov af665cc3d2 Use ctrl-: instead of ctrl-shift-: for inlay hints toggling
The latter is not posible to press in Zed, since `:` is typed as
`shift-;` with typical US keyboard layouts.

In the end, it's the same buttons you have to press to toggle the inlay
hints, but working this time.
2023-08-31 10:43:29 +03:00
Nate Butler e808386765 WIP UI Tweaks (#2911)
- Tighten up toolbar
- Reduce intensity of active tools
- Remove divider between project + branch
- Add a styletree for toolbar + move breadcrumb into it
- Some ts theme tidying

[[PR Description]]

Release Notes:

- Improved density and contrast of a number of UI elements.
2023-08-30 11:19:05 -04:00
Nate Butler 1da3be0646 Align diagnostic icons with other statusbar icons 2023-08-30 11:14:50 -04:00
Antonio Scandurra ea17d1638e Introduce code generation (#2901)
![CleanShot 2023-08-28 at 12 24
36@2x](https://github.com/zed-industries/zed/assets/482957/f97cb399-1ac2-4fa9-94a7-137d1eec711c)


Release Notes:

- Added a new "Inline Assist" feature that lets you transform a
selection or generate new code at the cursor location by hitting
`ctrl-enter`.
2023-08-30 14:58:22 +02:00
Conrad Irwin dd577074f2 vim: Fix relative motions (#2888)
This changes vim motions to be relative to fold lines, not display
lines, to match the behaviour of vim.

This is necessary for relative line numbers to make sense (as the most
important thing is you can do `3j` to get th e line that is numbered 3).


Release Notes:

- vim: Fix handling of motions when `soft_wrap` is enabled in zed. Like
in vim `j,k,up,down,$,^,0,home,end` will all now navigate in file
coordinates not display coordinates.
- vim: Add `g {j,k,up,down,$,^,0,home,end}` to navigate in display
coordinates.
- vim: Add `z o` and `z c` to open and close folds.
- vim: Add `z f` in visual mode to fold selection.

Note: this may be a jarring change if you're grown used to the current
behaviour of `j` and `k`. You can make the issue less acute by setting
`"soft_wrap":"none"` in your settings; or you can manually copy the
bindings for `g j` to the binding for `j` (etc.) in your keymap.json to
preserve the existing behaviour.
2023-08-29 11:19:37 -07:00