Commit Graph

407 Commits

Author SHA1 Message Date
Conrad Irwin
5dff458014
Ensure focus_in and focus_out fire on window activation (#3993)
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows

Release Notes:

- (preview only) vim: fix switching between multiple windows
2024-01-10 10:00:07 -07:00
Conrad Irwin
5d3f5611e5
guest promotion (#3969)
Release Notes:

- Adds the ability to promote read-only guests to read-write
participants in calls
2024-01-09 22:21:13 -07:00
Conrad Irwin
72c022f413 Ensure focus-sensitive tests have active windows 2024-01-09 21:38:06 -07:00
Conrad Irwin
1bf33b4b61 Ensure focus_in and focus_out fire on window activation
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows
2024-01-09 20:55:00 -07:00
Mikayla
9ce7ef8949
Remove the last of the major todos 2024-01-09 16:14:54 -08:00
Conrad Irwin
844d161c40 Allow adding write access to guests 2024-01-08 22:02:56 -07:00
Piotr Osiewicz
e4b1c76895
Display setting documentation in settings.json (#3936)
Let this screenshot of settings.json speak for itself: 

![image](https://github.com/zed-industries/zed/assets/24362066/fca60383-1788-43f9-803b-00f083394c8a)

Release Notes:
- Added code completion & on-hover documentation to Zed's settings.json
file.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-08 19:30:18 +01:00
Conrad Irwin
709682e8bc Tidy up TestContext lifecycle
Co-Authored-By: Max <max@zed.dev>
2024-01-05 16:31:41 -07:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
dfcb17fe74 Remove 2 suffix for theme
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:41:01 -08:00
Max Brunsfeld
4305c5fdbe Remove 2 suffix for ui, storybook, text
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:33:51 -08:00
Max Brunsfeld
0cf65223ce Remove 2 suffix for collab, rope, settings, menu
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:29:16 -08:00
Max Brunsfeld
9f99e58834 Remove 2 suffix for lsp, language, fuzzy
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:58:02 -08:00
Max Brunsfeld
c5a1950522 Remove 2 suffix for project
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:53:34 -08:00
Max Brunsfeld
4ddb26204f Remove 2 suffix for ai, zed_actions, install_ci, feature_flags
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:48:46 -08:00
Max Brunsfeld
789ce8dd75 Remove 2 suffix for workspace
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:08:51 -08:00
Max Brunsfeld
588976d27a Remove 2 suffix for editor
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:58:57 -08:00
Max Brunsfeld
0ac8aae17b Remove 2 suffix for language_tools, search, terminal_view, auto_update
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:52:40 -08:00
Max Brunsfeld
252694390a Remove 2 suffix for vim, diagnostics, go_to_line, theme_selector, command_palette, file_finder
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:42:49 -08:00
Conrad Irwin
a9349267ec hah, oops 2023-12-12 18:54:35 -07:00
Conrad Irwin
f35453caad COmment out tests again for now 2023-12-11 11:40:54 -07:00
Conrad Irwin
32837d67be vim2 compiling (but mostly commented out) 2023-12-08 18:47:14 +00:00
Piotr Osiewicz
b73ccc8180 Start out Copilot2;
Add hidden_action_types to CommandPaletteFilter.
WindowContext.available_actions now returns global actions as well.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-05 14:57:20 +01:00
Conrad Irwin
ffcec011f8 Don't use function_name in vim tests 2023-10-25 23:26:57 +02:00
Conrad Irwin
2b95db087b
Fix infinite loop in select all (#3154)
[[PR Description]]

Release Notes:

- Fixed an infinite loop in select all matches
([#2170](https://github.com/zed-industries/community/issues/2170)).
2023-10-24 02:58:48 -06:00
Conrad Irwin
0e035c1a95 Fix character selection 2023-10-24 10:50:08 +02:00
Conrad Irwin
6e4e19d8fc Fix infinite loop in select all 2023-10-23 16:08:12 +02:00
Conrad Irwin
b495669c86 Fix neovim tests with angle brackets 2023-10-22 22:24:35 -06:00
Conrad Irwin
3cf98c4fae Add | as a bracket and a motion
Although vim/nvim doesn't have | as brackets, it's common in langauges like Rust
and Ruby, and I expect it to work.
2023-10-22 22:17:34 -06:00
Conrad Irwin
9589f5573d Fix some bugs with vim objects
- softwrap interaction
- correct selection if cursor is on opening marker
2023-10-22 21:44:34 -06:00
Conrad Irwin
0dae0f6027
pixel columns (#3052)
@ForLoveOfCats and I found a few speedups that make this acceptably fast
(able to update ~10k selections in <100ms), so the remaining work here
is to fix the tests, and then ship!

Release notes:
- Updated up/down to work based on pixel positions
([#1966](https://github.com/zed-industries/community/issues/1966))
([#759](https://github.com/zed-industries/community/issues/759))
- vim: Fixed off-by-one in visual block mode
([2123](https://github.com/zed-industries/community/issues/2123))
2023-10-20 15:01:27 -06:00
Conrad Irwin
2de34a905d Hide any circumstantial evidence that this didn't work perfectly first
time
2023-10-20 14:45:37 -06:00
Conrad Irwin
352a554c74 Fix bug in vim visual block mode 2023-10-20 11:49:10 -06:00
Conrad Irwin
c7991ef04c Add "workspace: Toggle Vim Mode"
Co-Authored-By: Marshall <elliott.codes@gmail.com>
2023-10-20 11:41:13 -06:00
Conrad Irwin
1c36134cf9 Fix single column vim selections 2023-10-20 11:17:19 -06:00
Conrad Irwin
9d07561d99 Merge branch 'main' into pixel-columns 2023-10-18 23:00:56 -06:00
Conrad Irwin
3eb8aa8085 Refactor TextLayoutDetails construction 2023-10-18 22:56:11 -06:00
Conrad Irwin
cb76b2a6ad Make vim visual block work better 2023-10-18 22:23:06 -06:00
Conrad Irwin
85b76b1143
Don't wrap on paragraphs (#3094)
Release Notes:

- vim: `{` and `}` will no longer wrap around end of file
([#2116](https://github.com/zed-industries/community/issues/2116)).
2023-10-10 19:25:40 -06:00
Conrad Irwin
1de9add304 vim: Add shift-y 2023-10-10 18:46:49 -06:00
Conrad Irwin
ab050d1890 Use Horizontal ranges everywhere 2023-10-09 21:48:50 -06:00
Conrad Irwin
ef7e2c5d86 Get the project running! 2023-10-09 21:48:31 -06:00
Joseph T. Lyons
4b2c24dd8c Add enable vim mode checkbox to welcome screen 2023-10-08 20:07:59 -04:00
Conrad Irwin
2d99b327fc Don't wrap on paragraphs
For zed-industries/community#2116
2023-10-06 10:32:15 -06:00
Conrad Irwin
f1c743286d Clear SelectionGoal on input 2023-10-05 09:02:52 -06:00
Conrad Irwin
a4e77af571 Fix panic in increment 2023-10-04 15:13:01 -06:00
Max Brunsfeld
55da5bc25d Switch .leader_replica_id -> .leader_peer_id 2023-09-29 14:16:38 -07:00
Max Brunsfeld
c718b810f6 Merge branch 'main' into allow-following-outside-of-projects 2023-09-29 14:15:33 -07:00
Conrad Irwin
9b7bd4e9ae vim: Fix accidental visual selection when following 2023-09-29 12:08:25 -06:00
Conrad Irwin
e7ee8a95f6
vim: Fix some dw edge cases (#3058)
Release Notes:

- vim: Fix `dw` on the last word of a line, and on empty lines.
2023-09-28 15:32:29 -06:00
Conrad Irwin
91adefedfa
vim keybinding updates (#3057)
Release Notes:

- vim: Add ctrl-i to go forward
([#1732](https://github.com/zed-industries/community/issues/1732)).
ctrl-o was already supported.
- vim: Add `g <space>` to open the current snippet in its own file.
- vim: Escape will now return to normal mode even if completion menus
are open (use `ctrl-x ctrl-z` to hide menus, as in vim).
- vim: Add key bindings for Zed's various completion mechanisms:
- - `ctrl-x ctrl-o` to open the completion menu,
- -  `ctrl-x ctrl-l` to open the LSP action menu,
- - `ctrl-x ctrl-c` to trigger Copilot (requires configuring copilot),
- - `ctrl-x ctrl-a` to trigger the inline Assistant (requires
configuring openAI),

NOTE: we should add these to the docs before shipping 0.107 to stable.
2023-09-28 15:32:21 -06:00
Conrad Irwin
2f5eaa8475
vim increment (#3054)
- vim: add ctrl-a/ctrl-x for increment/decrement
2023-09-28 15:32:11 -06:00
Max Brunsfeld
a8b35eb8f5 Merge branch 'main' into allow-following-outside-of-projects 2023-09-28 11:58:28 -07:00
Max Brunsfeld
545b5e0161 Assign unique color indices to room participants, use those instead of replica_ids
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2023-09-28 11:06:09 -07:00
Conrad Irwin
768c991909 vim: Fix some dw edge cases 2023-09-27 23:09:09 -06:00
Conrad Irwin
2cb320e246 Escape returns to normal mode even if completion is open
For zed-industries/community#1746
2023-09-27 21:28:30 -06:00
Conrad Irwin
dd1cf5c3cf vim: add ctrl-a/ctrl-x
For zed-industries/community#1411
For zed-industries/community#619
2023-09-27 19:49:31 -06:00
Conrad Irwin
3573896fe0 Don't prompt to save unchanged files 2023-09-27 16:07:35 -06:00
Conrad Irwin
25429f760c ctrl-a/x for vim 2023-09-27 12:32:01 -06:00
Conrad Irwin
8e1bbf32be vim: Fix ctrl-u/ctrl-d
They should work by exactly half a screen, and also move the cursor.
2023-09-26 22:28:04 -06:00
Conrad Irwin
42df5ef45e
vim: Add multicursor shortcuts (#3032)
Adding a few bindings to bring first class feeling multiselect to zed's
vim emulation.

gn and gN are similar to similar vim bindings, ga is similar to gA (and
I doubt we need vim's real ga), g> and g< are just made up.

Release Notes:

- vim: `g n` / `g N` to select next/previous
- vim: `g >` / `g <` to skip current selection and select next/previous
- vim: `g a` to select all
2023-09-25 17:18:12 -05:00
Conrad Irwin
b29e295e1b vim: Add multicursor shortcuts
- g n / g N to select next/previous
- g > / g < to select next/previous replacing current
- g a to select all matches
2023-09-25 15:32:03 -06:00
Conrad Irwin
32f8733313 Code review changes 2023-09-20 21:29:45 -06:00
Conrad Irwin
7a7ff4bb96 Fix save related tests, and refactor saves again 2023-09-20 20:44:42 -06:00
Conrad Irwin
a59da3634b Fix backward search from command 2023-09-20 20:44:42 -06:00
Conrad Irwin
a25fcfdfa7 Iron out some edge-cases 2023-09-20 20:44:42 -06:00
Conrad Irwin
2d9db0fed1 Flesh out v1.0 of vim : 2023-09-20 20:44:41 -06:00
Conrad Irwin
a4f96e6452 tests: wait deterministically after simulating_keystrokes 2023-09-20 20:44:26 -06:00
Conrad Irwin
ba5d84f7e8 Fix vim tests on my machine
In a rare case of "it broke on my machine" I haven't been able to run
the vim tests locally for a few days; turns out I ran out of swap file
names...
2023-09-20 20:44:26 -06:00
Conrad Irwin
ea3a1745f5 Add vim-specific interactions to command
This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
2023-09-20 20:44:26 -06:00
Conrad Irwin
01b2db4845 Fix vim test recording 2023-09-20 12:01:04 -06:00
Conrad Irwin
8de67fd9d9 Fix vim panic when over-shooting with j 2023-09-20 11:20:35 -06:00
Conrad Irwin
1295e5b41f
vim: Use explicit global, not default (#2987)
This should have no user-visible impact, but tidies up one of the
awkwardnesses
of how vim uses global state at the moment.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-09-19 20:52:25 -06:00
Conrad Irwin
71e519aa3b vim: Use explicit global, not default 2023-09-18 14:22:41 -06:00
Conrad Irwin
adf313bd33
Fix vim-related panic (#2986)
Release Notes:

- fix panic that happens during collaboration (preview-only)
2023-09-18 12:21:38 -06:00
Conrad Irwin
417f28effe Fix vim-related panic 2023-09-18 12:13:50 -06: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
Conrad Irwin
4244e7893f Clip twice 2023-09-18 08:28:21 -06:00
Conrad Irwin
c4797f87b4 clip FoldPoint earlier
fold_point_to_display_point calls to_offset on the fold point, which
panics if it hasn't been clipped.

https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1694850156370919
2023-09-16 12:58:39 -07: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
Kirill Bulatov
a9de6c3dba Properly handle inlay highlights in the InlayMap
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-09-14 22:08:12 +03:00
Kirill Bulatov
890a587254 Use standalone inlay background highlights 2023-09-14 22:08:12 +03:00
Conrad Irwin
0958def770 Remove another supported exemption 2023-09-12 12:48:36 -06:00
Conrad Irwin
dcaba9d9e7 Remove supported exception
(and refactor tests to be more linear)
2023-09-12 10:13:24 -06:00
Conrad Irwin
7daed1b2c3 Fix 0 used in a count 2023-09-12 09:56:23 -06:00
Conrad Irwin
c2c521015a Fix bug where cursors became invisible if replaying was interrupted 2023-09-11 20:56:22 -06:00
Conrad Irwin
76d55244a1 Clear counts when switching modes 2023-09-11 18:30:31 -06: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
Conrad Irwin
5d782b6cf0
vim . to replay (#2936)
Release Notes:

- vim: Add `.` to replay
([#946](https://github.com/zed-industries/community/issues/946))
- vim: Fix `J` in visual mode, and with counts.
2023-09-08 11:52:35 -06:00
Conrad Irwin
88dae22e3e Don't replay ShowCharacterPalette 2023-09-08 11:35:00 -06:00
Conrad Irwin
5f897f45a8 Fix f,t on soft-wrapped lines
Also remove the (dangerously confusing) display_map.find_while
2023-09-08 10:16:46 -06: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 Irwin
f22d53eef9 Make test more deterministic
Otherwise these pass only when --features=neovim is set
2023-09-06 14:14:49 -06:00
Conrad Irwin
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
55dd0b176c Use consistent naming 2023-09-02 19:52:18 -06:00