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
This PR is a continuation of the components UI exploration I've been
doing. It adds an example to the GPUI examples page and totally
restructures the generics on our MouseEventHandler.
Release Note:
- N/A
Part of
https://linear.app/zed-industries/issue/Z-2750/investigate-performance-of-collaborating-on-large-files-with-inlay
* Declares client capabilities for hint resolution, marking both fields
available for resolution (`textEdits` and `tooltop`) as resolvable.
We do not use these fields anymore, hence can omit resolving them for
now, but LSP servers can omit them during general hint requests.
* Removes `tooltip` and replaces complex `label` with its simple string
counterpart for clients' hint responses from host: both should be
resolved through host later
Release Notes:
- Reduces collab mode clients' inlay hint footprint by enabling hint
data resolution
Here's an example in `crates/gpui/examples/corner_radii.rs`
![CleanShot 2023-08-12 at 11 06
09@2x](https://github.com/zed-industries/zed/assets/1789/1b5992ac-f7ef-45d8-b8c2-f0e677b07dd9)
@iamnbutler, in the themes, anywhere we have a container style can now
take either a `corner_radius` or a `corner_radii` field, both of these
fields can either have 1 number (for all 4 corners) or a an object like:
```
{
top_left?: number,
top_right?: number,
bottom_left?: number,
bottom_right?:number
}
```
Fields that are not included in this second representation default to 0
corner radius.
This PR fixes two bugs we discovered in Zed's mouse event handling while
investigating an interesting and mysterious bug we we were seeing, where
spurious `MouseMoved` events would continuously be dispatched after
control-clicking.
Release Notes:
- Fixed a rendering glitch that could occur after control-clicking
certain elements.
This adds IBM Plex as a font option available to use as `ui_sans`
Note: This PR adds a static list of accepted font types in `/font`, as
LICENSE files were causing the app to crash when Zed was trying to load
them as fonts.
Release Notes:
- N/A (No user facing changes)
Thanks @ForLoveOfCats for getting me unstuck ❤️
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.
I went to add in `zprofile` to the bash language config to get syntax
highlighting for it. After adding it in, Zed was still not highlighting
the file. I checked and saw that we are using `Path::extension()` in
`language_for_file()`, which [returns `None` when a file's name begins
with a
`.`](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.extension),
such as in the case of `.zprofile`. This PR adds a custom method, with
some tests, that just tries to grab the last component in the file name
if `Path::extension` returns `None`. Not sure if `ext` is the best name,
but I can't use `extension`.
Maybe this method should be called `extension_or_hidden_file_name()`?
Release Notes:
- Fixed a bug where language detection would fail for files starting
with `.` in their names.
- Added syntax highlighting for `.zprofile` files
With this PR, I've eliminated almost all references to window ids
outside of the internals of GPUI. All public methods taking these ids
are now defined on `AnyWindowHandle`, which provides a more coherent
narrative around windows as a concept.