Commit Graph
246 Commits
Author SHA1 Message Date
Conrad Irwin c591a6b231 Fix zed-industries/community#1950 2023-08-25 11:34:07 -06:00
Max Brunsfeld 0596c2f103 Format let-else statements 2023-08-25 10:11:32 -07:00
Mikayla Maki c4e7adf6f0 Introduce channel notes (#2880)
![Screen Shot 2023-08-24 at 5 26 53
PM](https://github.com/zed-industries/zed/assets/326587/3e84c5a6-1aaf-4335-a880-4c32eb83332d)

### Todo

* [x] Snapshot channel buffers when everyone closes the buffer
* [x] Ensure that users who are in both a project and a channel note
have the same color in both places
* [x] Allow following project collaborators into channel notes
* [x] Expose notes for the current channel under "Current Call" section
of the collaboration panel
* [x] Offline state for the channel notes view
* [x] Make the channel context menu accessible to all members (to expose
the notes)
* [x] Wire in view and Item method overrides

Release Notes:

- N/A
2023-08-24 18:01:28 -07:00
Max BrunsfeldandMikayla 90b815e2f9 Make channel notes view searchable and navigable via pane history
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 17:18:18 -07:00
Conrad Irwin 4a80e136c9 vim: Fix linewise copy of last line with no trailing newline
Along the way, delete the VimBindingTestContext by updating the
visual tests to no-longer need it.
2023-08-24 00:00:12 -06:00
Conrad Irwin 21b6d69d61 Rewrite paste
- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
2023-08-22 13:27:57 -06:00
Conrad Irwin 3b7b5bc3f7 Add test for word characters in vim 2023-08-21 22:37:14 -06:00
Piotr Osiewicz 9cbc680636 Merge branch 'main' into Z-2819 2023-08-21 17:41:27 +02:00
Piotr Osiewicz 0a0daa6842 Use new char_kind (parameterized by language) 2023-08-21 17:39:38 +02:00
Conrad Irwin 9f03074d96 Don't show vim mode when disabled 2023-08-18 15:50:34 -06:00
Conrad Irwin 08aa9b95b9 Fix <Enter> to go to non-whitespace character
Fixes: zed-industries/community#831
2023-08-18 12:24:39 -06:00
Conrad Irwin eb83265856 Fix cursor adjustment on scroll
Fixes: zed-industries/community#1929

Also preserves visual modes correctly.
2023-08-18 11:23:43 -06:00
Conrad Irwin b855d248bd vim visual block (#2849)
Release notes:

- vim: add Visual Block mode
([#984](https://github.com/zed-industries/community/issues/984)),
([#1415](https://github.com/zed-industries/community/issues/1415)).
- vim: add support for `a<object>` and `i<object>` in visual modes
- vim: fix scroll shortcuts (`ctrl-{f,b,d,u,e,y}`) in visual modes
- allow `shift-enter` to type a newline.
2023-08-18 09:55:40 -06:00
Conrad Irwin 9f6567f2a9 Fix visual objects
Adds 'a'/'i' in visual mode
2023-08-17 17:13:23 -06:00
Conrad Irwin f16b60ce52 Give up on monospace indicator
Changing mode almost always introduces the (1 selected) text in
the status bar, so we may as well also keep the --'s for block and line
mode.
2023-08-17 16:04:55 -06:00
Conrad Irwin 39b149d1f9 Preserve line mode selection on undo
This diverges from vim's behaviour (which collapses the
cursor to a single point on undo).
2023-08-17 15:40:27 -06:00
Conrad Irwin 82b40f4136 Fix edge-cases in visual block insert 2023-08-17 15:16:26 -06:00
Conrad Irwin 03c12decbc Store some vim state per-editor
This fixes a bug where opening and closing command would reset your
selection incorrectly.
2023-08-17 14:09:47 -06:00
Mikayla a37da1b636 Merge branch 'main' into project_search_design 2023-08-17 01:56:05 -07:00
Conrad Irwin 03e0c6d2d6 Tidy-up 2023-08-16 22:29:28 -06:00
Conrad Irwin 17f8742a27 Disable autoindent in visual block insert mode 2023-08-16 10:44:59 -06:00
KCaverly 4e3526b616 Merge branch 'main' of github.com:zed-industries/zed into project_search_design 2023-08-16 12:43:04 +01:00
Conrad Irwin d37246dee7 Vim visual block mode
This isn't quite an exact emulation, as instead of using one selection
that is magically in "column mode", we emulate it with a bunch of zed
multi-selections (one per line).

I think this is better, as it requires fewer changes to the codebase,
and lets you see the impact of any changes immediately on all lines.

Fixes: zed-industries/community#984
2023-08-15 16:00:50 -06:00
Max BrunsfeldandMikayla 96f14e23a9 Run until parked when setting editor's state via EditorTestContext
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-15 13:42:54 -07:00
Conrad Irwin 99321c01b7 Add a VisualBlock mode
Instead of trying to extend the Mode::Visual special case, just split
out into three different modes.
2023-08-15 10:00:45 -06:00
Conrad Irwin 3aec608f60 Fix vim selection to include entire range (#2787)
Update vim mode to have vim selection and editor selections match.
Before this we had to adjust between vim selections and real selections
when making changes; now we have to adjust when making selections.

Release Notes:

- vim: Ensure editor selection matches the vim selection
([#1796](https://github.com/zed-industries/community/issues/1796)).
- vim: Fix `s` in visual line mode
- vim: Add `o` and `shift-o` to toggle direction of visual selection
- vim: Fix `v` and `shift-v` to toggle back to normal mode
- vim: Fix block selections like `vi}` to contain correct whitespace
2023-08-15 08:36:17 -06:00
Conrad Irwin 8e909670cd Fix vim escape in normal mode
Fixes: zed-industries/community#1857
2023-08-14 16:05:41 -06:00
Conrad Irwin ff42104392 Merge branch 'main' into vim-visual-selection 2023-08-14 15:29:33 -06:00
Piotr Osiewicz a5f96dade0 Merge branch 'main' into project_search_design 2023-08-09 12:30:48 +02:00
Nathan Sobo c843749cb0 Store an AnyWindowHandle in WindowContext 2023-08-08 11:08:37 -06:00
Piotr Osiewicz 7f2d4abe4b Finish migration to modes for buffer search 2023-08-08 15:57:07 +02:00
Piotr Osiewicz 87f8fa36a7 Remove SearchOptions::REGEX.
A bit WIP as it awaits migration of buffer search to modes
2023-08-08 14:42:11 +02:00
Nathan Sobo ce33bd19e5 Get compiling 2023-08-07 19:08:58 -06:00
Max Brunsfeld a318f5465e Fix warnings surfaced in Rust 1.71 2023-08-02 09:19:23 -07:00
Conrad Irwin 9fa277f4b3 TEMP 2023-08-02 15:06:46 +01:00
Kirill Bulatov a4f69b5b45 Add buffer search history 2023-08-01 01:31:28 +03:00
Conrad Irwin 2921cd77ca Fix visual selection of trailing newline 2023-07-28 22:38:39 -06:00
Conrad Irwin e6f1a6f9a9 Merge VisualChange -> Substitute
They both are supposed to work the same.
2023-07-28 15:32:02 -06:00
Conrad Irwin 4222ffad80 Fix substitute in visual line mode 2023-07-28 15:26:40 -06:00
Conrad Irwin 29b0f54255 Add o/O for flipping selection 2023-07-28 15:26:40 -06:00
Conrad Irwin 35e3b03af6 Fix crash when deleting a long line in visual line mode 2023-07-28 15:26:40 -06:00
Conrad Irwin adc89d3418 Add support for visual ranges ending with a newline
These primarily happen when first entering visual mode, but can also
be created with objects like `vi{`.

Along the way fix the way ranges like `vi{` are selected to be more
similar to nvim.
2023-07-28 15:26:40 -06:00
Conrad IrwinandMax Brunsfeld 737efc0c9d Fix vim selection to include entire range
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-07-28 15:26:40 -06:00
Mikayla Maki fb2c85ee9e Make mode indicator follow vim enabled state 2023-07-27 16:14:56 -07:00
JuliaandMikayla Maki 9f5ffa2b6e Avoid panic by accessing view handle by global in wrong window
View handles are window specific but this global will be doing things
in all windows, that would cause a panic when it attempted to update
a status bar mode indicator in a background window

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-07-27 18:53:05 -04:00
Conrad Irwin 44f4f14010 Add a mode indicator for vim (#2763)
Release Notes:

- vim: add a mode indicator
([#409](https://github.com/zed-industries/community/issues/409))

Now updated screenshots with @iamnbutler 
<img width="1043" alt="Screenshot 2023-07-25 at 11 11 57"
src="https://github.com/zed-industries/zed/assets/94272/8301479a-8b58-42d8-81a1-bc40e1e0a4df">
<img width="1043" alt="Screenshot 2023-07-25 at 11 12 00"
src="https://github.com/zed-industries/zed/assets/94272/89c3b8bd-9cbc-4fd7-ad10-dac5538ed3a3">
<img width="1043" alt="Screenshot 2023-07-25 at 11 12 12"
src="https://github.com/zed-industries/zed/assets/94272/adc87fe3-a720-4779-853b-df9443407046">
2023-07-25 20:18:23 -06:00
Conrad IrwinandMikayla Maki e81bab4e2e A little refactor
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-07-25 12:55:01 -06:00
Conrad IrwinandNate Butler 8fd9cba675 Update status bar theming
Co-Authored-By: Nate Butler <iamnbutler@gmail.com>
2023-07-25 11:06:41 -06:00
Conrad Irwin 1fccc35107 Refactor mode indicator to remove itself
One of the problems we had is that the status_bar shows a gap between
items, and we want to not add an additional gap for an invisible status
indicator.
2023-07-24 09:51:54 -06:00
Conrad Irwin 6ef1e48a77 Add a mode indicator for vim
This is the second most common remaining complaint (after :w not
working).

Fixes: zed-industries/community#409
2023-07-21 16:06:14 -06:00