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.
This is broken because vim currently sets settings only on the active
editor. Fix this by correcting the range on the currently active editor.
It would be nice (at some point) to refactor how vim sets settings, but
that's for another day.
Release Notes:
- vim: Fix bug when jumping to definition in new file accidentally
entered visual mode.
This is broken because vim currently sets settings only on the active
editor. Fix this by correcting the range on the currently active editor.
It would be nice (at some point) to refactor how vim sets settings, but
that's for another day.
I want to use this on another branch, but it's a sweeping change,
so this prepares the ground for it. This can always be reverted if
it doesn't work out.
This change adds support for choosing a pane based on direction; and
adds default keybindings (`cmd+k cmd+{left,right,up,down}`) and vim
keybindings.
Release Notes:
- Add support for navigating to the next pane in a given direction using
`cmd+k cmd-{up,down,left,right}`
([#476](https://github.com/zed-industries/community/issues/476),
[#478](https://github.com/zed-industries/community/issues/478))
- Vim: adds support for many window related shortcuts: `ctrl-w
{h,j,k,l,up,down,left,right,w,W,p}` for navigating around panes, `ctrl-w
{q,c}` for closing panes and `ctrl-w {v,s}` for splitting panes.
Closes https://github.com/zed-industries/community/issues/75
Closes https://github.com/zed-industries/community/issues/1749
The PR
* changes keybindings for `Editor && mode == auto_height` context:
before, `alt-enter` and `alt-shift-enter` added new lines in such
editors, including the one from buffer search.
New bindings are the same as in `Editor && mode == full` context.
* adds `search::SelectAllMatches` action and binds it to `Alt + Enter`
by default, to select all matches of a buffer search
The behavior mimics VSCode: we do not move the screen even if all
selections are out of the visible range (Cmd+G will navigate there) and
allow reselecting the results from both pane and search field, as long
as the search is not dismissed.
Release Notes:
- Added `search::SelectAllMatches` (`Alt + Enter` default) action to
place carets and select all buffer search results
([#75](https://github.com/zed-industries/community/issues/75),
[#1749](https://github.com/zed-industries/community/issues/1749)).
We're finally doing the thing.
TODO:
- [x] Choose an approach
- Decided to add a new element just for the pane axis, containing a
slimmed down copy of the flex code.
- [x] Wire through callbacks and pointers so that data goes where it
needs to
- [x] Do the flex juggling math on resize
- [x] Update the flexes when updating the split tree
- [x] Restore the active_pane_magnification setting
- [x] Serialize an axis' flexes
Release Notes:
- Made the center pane group splits resizable. Note that resizing is
disabled if the `active_pane_magnification` setting is changed from
default.
As part of this I added `assert_shared_state()` to the
NeovimBackedTestContext so that it is more like a drop-in replacement
for the VimTestContext.
The remaining part of zed-industries/community#682 is adding bracket
matching to plain text. It looks like the current logic requires there
to be a tree sitter language for the language in order to support
bracket matching. I didn't fix this in this PR because I was unsure
whether to try and work around that, or to try and add a plain text tree
sitter language.
Release Notes:
- vim: support `{` and `}` for paragraph motion
([#470](https://github.com/zed-industries/community/issues/470)).
- vim: fix `%` at the end of the line
([#682](https://github.com/zed-industries/community/issues/682)).
Language servers such as typescript-language-servers report a single
work event, ending right after server's startup.
Other servers might send more similar event, also during startup.
The rest of the events are diagnostic-related and we filter them out.
React on such events with /refresh-like hint update, that will check
only the visible part of the editor for hints and might be replaced by
other /refresh requests, if needed.
* Filter out queries for outdated buffers just before hint tasks spawn:
multicared edits might empit standalone events simultaneously
* Only spawn inlay update tasks for visible buffers with corresponding
language
* Do not spawn tasks for local projects' buffers without LSP servers
Added .assert_shared_state() to NeovimBackedTestContext – although it's
not strictly necessary to show the expected behaviour in the test file
(as we can just compare to neovim's JSON recording), it makes it much
easier to understand what we're testing.