Marshall Bowers
33790b81fc
Enable clippy::useless_format ( #8758 )
...
This PR enables the
[`clippy::useless_format`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_format )
rule and fixes the outstanding violations.
Release Notes:
- N/A
2024-03-02 23:31:58 -05:00
Marshall Bowers
9735912965
Enable clippy::clone_on_copy ( #8728 )
...
This PR enables the
[`clippy::clone_on_copy`](https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_copy )
rule and fixes the outstanding violations.
Release Notes:
- N/A
2024-03-02 17:37:48 -05:00
Marshall Bowers
5935681c5c
Enable clippy::single_char_pattern ( #8727 )
...
This PR enables the
[`clippy::single_char_pattern`](https://rust-lang.github.io/rust-clippy/master/index.html#/single_char_pattern )
rule and fixes the outstanding violations.
Release Notes:
- N/A
2024-03-02 17:04:59 -05:00
Conrad Irwin
9906b31691
fix vim repeat ( #8513 )
...
Release Notes:
- vim: Fixed `.` when multiple windows are open
([#7446 ](https://github.com/zed-industries/zed/issues/7446 )).
- vim: Fixed switching to normal mode after `J`, `<` or `>` in visual
mode ([#4439 ](https://github.com/zed-industries/zed/issues/4439 ))
- vim: Added `ctrl-t` and `ctrl-d` for indent/outdent in insert mode.
- Fixed indent/outdent/join lines appearing to work in read-only buffers
([#8423 ](https://github.com/zed-industries/zed/issues/8423 ))
- Fixed indent with an empty selection when the cursor was in column 0
2024-02-27 21:36:12 -07:00
Hans and Conrad Irwin
f3fa3b910a
vim: Add HTML tag support for #4503 ( #8175 )
...
a simple code for html tag support, I've only done the basics, and if
it's okay, I'll optimize and organize the code, and adapt other parts
like `is_multiline`, `always_expands_both_ways`, `target_visual_mode`,
etc
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2024-02-26 22:48:19 -07:00
Conrad Irwin
8cf36ae603
vim: Fix some problems with visual mode testing ( #8461 )
...
Release Notes:
- N/A
2024-02-26 20:15:27 -07:00
gmorenz
8f5d7db875
First pass at making a linux keymap ( #8082 )
...
Undoubtedly not perfect, but this should be something we can work off
of.
Note that matching keybindings with ctrl in them is currently broken on
linux (or at least x11). This keymap might just manage to be less useful
than using the macos one on linux until that is fixed... the proximate
cause of this is that the `key` field of the `Keystroke` struct looks
like `"\u{e}"` instead of `"n"` when `ctrl-n` is pressed.
Release Notes:
- N/A
2024-02-20 13:51:54 -08:00
Conrad Irwin
a1899bac4e
vim: Fix renaming ( #7714 )
...
This was broken by #7647
Release Notes:
- N/A
2024-02-12 22:28:26 -07:00
Conrad Irwin
bd882c66d6
vim lifecycle ( #7647 )
...
Release Notes:
- Fixed :0 and :% in vim mode
([#4303 ](https://github.com/zed-industries/zed/issues/4303 )).
- Improved keymap loading to not load vim key bindings unless vim is
enabled
**or**
- N/A
2024-02-10 16:21:13 -07:00
f09da1a1c8
vim hml ( #7298 )
...
- Add a setting for `vertical_scroll_offset`
- Fix H/M/L in vim with scrolloff
Release Notes:
- Added a settings for `vertical_scroll_offset`
- vim: Fix H/M/L with various values of vertical_scroll_offset
---------
Co-authored-by: Vbhavsar <vbhavsar@gmail.com >
Co-authored-by: fdionisi <code@fdionisi.me >
2024-02-02 19:24:36 -07:00
Kirill Bulatov
944a1f8fb0
Send lsp_types::InitializeParams with Zed version ( #7216 )
...
Based on the great work in
https://github.com/zed-industries/zed/pull/7130 , now sends this data
```
[crates/lsp/src/lsp.rs:588] ClientInfo { name: name.to_string(), version: Some(version.to_string()) } = ClientInfo {
name: "Zed Dev",
version: Some(
"0.122.0",
),
}
```
with every LSP server initialization.
Release Notes:
- Added Zed name and version to LSP InitializeParams requests
2024-02-01 18:39:28 +02:00
Conrad Irwin
4143d3a36e
Work on tests
2024-01-21 22:00:35 -07:00
Thorsten Ball and Conrad
87be105af7
When searching in visual mode switch to normal mode
...
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.
Co-authored-by: Conrad <conrad@zed.dev >
2024-01-20 16:33:07 +01:00
Conrad Irwin
4e118f3dd7
Fix some cases of broken repeat in vim
2024-01-18 13:20:08 -07:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos
2024-01-17 14:31:21 -08: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
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
Conrad Irwin and Max
709682e8bc
Tidy up TestContext lifecycle
...
Co-Authored-By: Max <max@zed.dev >
2024-01-05 16:31:41 -07:00
Max Brunsfeld and Mikayla
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
ffcec011f8
Don't use function_name in vim tests
2023-10-25 23:26:57 +02:00
Conrad Irwin
b495669c86
Fix neovim tests with angle brackets
2023-10-22 22:24:35 -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
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
2f5eaa8475
vim increment ( #3054 )
...
- vim: add ctrl-a/ctrl-x for increment/decrement
2023-09-28 15:32:11 -06:00
Conrad Irwin
768c991909
vim: Fix some dw edge cases
2023-09-27 23:09:09 -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
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
2d9db0fed1
Flesh out v1.0 of vim :
2023-09-20 20:44:41 -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
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 and
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
3a7b551e33
Fix tests with no neovim
2023-09-02 19:43:05 -06:00
Conrad Irwin
d3650594c3
Fix find_{,preceding}boundary to work on buffer text
...
Before this change the bounday could mistakenly have happened on a soft
line wrap.
Also fixes interaction with inlays better.
2023-08-29 18:03:29 -07:00
Conrad Irwin
dee1a433dd
A few more fixes for wrapped line motions
2023-08-25 14:40:04 -06:00
Conrad Irwin
20aa2a4c54
vim: Fix relative line motion
...
Before this change up and down were in display co-ordinates, after this
change they are in fold coordinates (which matches the vim behaviour).
To make this work without causing usabliity problems, a bunch of extra
keyboard shortcuts now work:
- vim: `z {o,c}` to open,close a fold
- vim: `z f` to fold current visual selection
- vim: `g {j,k,up,down}` to move up/down a display line
- vim: `g {0,^,$,home,end}` to get to start/end of a display line
Fixes : zed-industries/community#1562
2023-08-25 14:40:04 -06:00
Conrad Irwin
e4794e3134
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
33d7fe02ee
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
168a213a44
Add test for word characters in vim
2023-08-21 22:37:14 -06:00
Conrad Irwin
d1aa82bb48
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
3514816ece
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
Conrad Irwin
7598030102
Tidy-up
2023-08-16 22:29:28 -06:00
Conrad Irwin
7f06191c9f
Disable autoindent in visual block insert mode
2023-08-16 10:44:59 -06:00
Conrad Irwin
1b4dd49b1d
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 Brunsfeld and Mikayla
943aeb8c09
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
1cc0798aea
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
fb90eada70
Merge branch 'main' into vim-visual-selection
2023-08-14 15:29:33 -06:00