Omit in buffers with one or zero running language servers with the
capability to provide completions
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
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>
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>
Tailwind likes to throw a lot of completion data at us, this gets it to
send less. Previously it would respond to a completion with 2.5 MB JSON
blob, now it is more like 0.8 MB.
Relies on a local copy of lsp-types with the `itemDefaults` field added.
I don't have write perms to push to our fork of the crate atm, sorry :)
Tailwind needs user languages and language-to-language-id mappings to
start providing completions for those languages.
And also it has emmet completions disabled by default, enable them.
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.