Commit Graph
11067 Commits
Author SHA1 Message Date
Julia e31fdeebc6 Make multi-server completion requests not serial 2023-08-29 20:42:13 -04:00
Julia 84a7aae52d Woooooops, don't notify the language server until initialized 2023-08-29 15:37:51 -04:00
JuliaandAntonio Scandurra ce0038a8ab Style language server name in completion menu
Omit in buffers with one or zero running language servers with the
capability to provide completions

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-29 11:21:02 -04:00
Julia e92a5b7eef Add Tailwind server to TSX 2023-08-28 15:19:16 -04:00
JuliaandKirill Bulatov f197a59d69 Initial unstyled language server short name in completions
Co-Authored-By: Kirill Bulatov <kirill@zed.dev>
2023-08-28 11:27:45 -04:00
JuliaandMax Brunsfeld 1d63cf0ca0 Add word_characters to language overrides & use for more things
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>
2023-08-25 18:46:30 -04:00
Julia 045faea6e7 Add Tailwind server to JS/TS 2023-08-23 00:11:15 -04:00
Julia 2936f98ff5 Add VSCode CSS language server & add Tailwind to .css files 2023-08-22 23:50:40 -04:00
Julia 228326d9ec Only generate workspace/configuration for relevant adapter 2023-08-22 23:36:04 -04:00
Kirill Bulatov a87b39b1cf Reenable html, remove emmet due to the lack of the code 2023-08-22 12:51:14 +03:00
Kirill Bulatov efca47ae15 Expand word characters for html and css 2023-08-22 12:41:59 +03:00
Piotr OsiewiczandJulia Risley 97573a1995 Z 2819 (#2872)
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>
2023-08-22 12:23:30 +03:00
Julia 56fa89c8e4 Use updated lsp-types fork branch 2023-08-18 11:57:19 -04:00
Julia ca3fdfc6b6 Utilize LSP completion itemDefaults a bit
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 :)
2023-08-17 21:57:39 -04:00
Kirill Bulatov 137c3a5d53 Provide more data to tailwind langserver
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.
2023-08-17 16:14:55 +03:00
Julia be8b778229 Register initial request handlers before launching server 2023-08-16 21:25:17 -04:00
Julia 76b55a844a Add broken Tailwind language server 2023-08-16 11:53:05 -04:00
Julia db37d194d7 Use originating language server to resolve additional completion edits 2023-08-15 16:34:15 -04:00
Julia cae21a6758 Add support for querying multiple language servers for completions 2023-08-15 12:48:30 -04:00
Conrad Irwin 3aec608f60 Fix vim selection to include entire range (#2787)
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
2023-08-15 08:36:17 -06:00
Conrad Irwin 5dc507560c Fix vim escape in normal mode (#2844)
Fixes: zed-industries/community#1857

- vim: Fix escape in normal mode
([#1857](https://github.com/zed-industries/community/issues/1857)).
2023-08-15 08:35:49 -06:00
Mikayla Maki 644f4e10bb Add components example (#2846)
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
2023-08-15 03:17:50 -07:00
Mikayla ec2490269d Add components example
Re-arrange generics on mouse event handler
Add TypeTag struct for dynamically tagged components
2023-08-15 03:06:43 -07:00
Conrad Irwin 8e909670cd Fix vim escape in normal mode
Fixes: zed-industries/community#1857
2023-08-14 16:05:41 -06:00
Conrad Irwin ff42104392 Merge branch 'main' into vim-visual-selection 2023-08-14 15:29:33 -06:00
Conrad Irwin ede910fee6 Better tests 2023-08-14 15:03:16 -06:00
Kirill Bulatov 38d052bf05 Query less inlay hints (#2842)
Part of
https://linear.app/zed-industries/issue/Z-2750/investigate-performance-of-collaborating-on-large-files-with-inlay

Instead of querying the entire file for hints, query visible editor(s)
range + the areas above and below, of the same height.
Non-invalidating future queries (e.g. scrolling) query only missing
parts of the ranges.

Release Notes:

- Improved LSP resource usage by querying less hints for big files
2023-08-14 23:06:30 +03:00
Kirill Bulatov e16ac02134 Strip off inlay hint data that should be resolved (#2843)
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
2023-08-14 23:06:19 +03:00
Kirill Bulatov 0aa34790e5 Strip off inlay hints data that should be resolved 2023-08-14 22:50:55 +03:00
Kirill Bulatov a43ffba3cd Better assert multibuffer edit test results 2023-08-14 20:12:35 +03:00
Kirill Bulatov 0487494da6 Do not filter out hints to be removed 2023-08-14 19:20:20 +03:00
Kirill Bulatov d055ffdf76 Clip offsets in inlay hint queries 2023-08-14 18:39:30 +03:00
Kirill Bulatov 22420ec3dc Optimize query ranges tracking 2023-08-14 16:19:44 +03:00
Kirill Bulatov e5fc5673ce Fix hint tests, add a char boundary bug test 2023-08-14 16:01:02 +03:00
Kirill Bulatov c941405bf9 Properly generate ranges to query 2023-08-14 11:25:02 +03:00
Kirill Bulatov 831b3e2c70 Do not add duplicate hints to the cache 2023-08-14 11:25:02 +03:00
Kirill Bulatov e26790e6fd Query inlay hints for parts of the file 2023-08-14 11:25:02 +03:00
Kirill Bulatov 383387a570 Query hints on every scroll 2023-08-14 11:25:02 +03:00
Kirill Bulatov 93b4957012 Hide inlay cache fields 2023-08-14 11:25:02 +03:00
Mikayla Maki ad20edd716 Allow individual corner radii on containers, images, and drop shadows (#2841)
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.
2023-08-12 12:36:05 -07:00
Mikayla 75edcdb56f Make each setting optional 2023-08-12 12:23:46 -07:00
Mikayla 05f56bfdeb Add deserialization helper 2023-08-12 12:21:44 -07:00
Nathan Sobo 2b87398bf4 Include drop shadows with different corner radii in the example 2023-08-12 11:08:58 -06:00
Nathan Sobo 8d32b7e0fa Allow individual corner radii on drop shadows 2023-08-12 10:58:08 -06:00
Nathan Sobo 44bf7736ae Allow distinct corner radii for images 2023-08-12 10:50:04 -06:00
Nathan Sobo 56ba5b7edb Wire up per corner radii for quad
Still need to expose this in the styling layer and allow images
to have per corner radii.
2023-08-12 10:40:23 -06:00
Mikayla Maki 17e2bf7326 Add a compile test for the element derive (#2840)
Tried to use this the new element derive on a branch and ran into some
bugs, this fixes those.

Release Notes:

- N/A
2023-08-11 18:08:13 -07:00
Mikayla 3a9e050232 Add a compile test for the element derive 2023-08-11 18:00:12 -07:00
Piotr Osiewicz 625ac1c1ed chore: use Cow instead of String for tooltips (#2838)
A QoL change to align `Tooltip` with other elements like `Label`
Release Notes:

- N/A
2023-08-11 15:29:55 +02:00
Max Brunsfeld 809e203ee1 Restore shutdown behavior (#2837)
Deals with https://github.com/zed-industries/community/issues/1898

Restores original close behavior from
https://github.com/zed-industries/zed/pull/2832/files#diff-89af0b4072205c53b518aa977d6be48997e1a51fa4dbf06c7ddd1fec99fc510eL444
(load diff for the last file, zed.rs)

and adds a better name for the variable.

Release Notes:

- Fixes `cmd-q` not working
2023-08-09 13:50:21 -07:00