Use word_characters to feed completion trigger characters as well and
also recognize kebab as a potential sub-word splitter. This is fine for
non-kebab-case languages because we'd only ever attempt to split a word
with a kebab in it in language scopes which are kebab-cased
Co-Authored-By: Max Brunsfeld <max@zed.dev>
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
![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
- 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
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.
Release Notes:
- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)
---------
Co-authored-by: Julia Risley <julia@zed.dev>
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
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