Commit Graph
11173 Commits
Author SHA1 Message Date
KCaverlyandPiotr 7e2e69a6b5 remove kill search, and restart search immediately upon cycle mode
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 16:13:21 +01:00
KCaverlyandPiotr 9d4fe6b926 fix semantic search panic which is created via incompatible build_search_query path
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 15:50:54 +01:00
KCaverly 5c337f820d removed commented out code 2023-08-16 14:01:53 +01:00
KCaverlyandPiotr 4c6dbb2e57 adjusted icon sizes downwards
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 14:01:06 +01:00
KCaverlyandPiotr 53bf8c1e65 fix editor height in buffer search, but the dancing is back
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 13:51:41 +01:00
KCaverlyandPiotr ca1573c580 remove redundant and unneeded styling
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 12:55:32 +01:00
KCaverly 4e3526b616 Merge branch 'main' of github.com:zed-industries/zed into project_search_design 2023-08-16 12:43:04 +01:00
KCaverlyandPiotr 6437a7ead7 remove regex keymap, and made spacing consistent between search objects
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 12:17:59 +01:00
KCaverlyandPiotr ce618ad740 reorganize search bar, enable filters and disable select all during invalid states
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 11:35:09 +01:00
Kirill Bulatov 01cb8375e6 Move gpui derives tests into gpui crate to avoid dependency cycles (#2851)
`cargo run` on Zed project leads to rust-analyzer evantually emitting

`[ERROR project_model::workspace] cyclic deps:
gpui_macros(Idx::<CrateData>(269)) -> gpui(Idx::<CrateData>(264)),
alternative path: gpui(Idx::<CrateData>(264)) ->
gpui_macros(Idx::<CrateData>(269))`

error after loading the project.

The PR fixes this by moving away the test to the "root" project.

Release Notes:

- N/A
2023-08-16 10:41:12 +03:00
Kirill Bulatov 6d3e568fdc Move gpui derives tests into gpui crate to avoid dependency cycles
`cargo run` on Zed project leads to rust-analyzer evantually emitting

`[ERROR project_model::workspace] cyclic deps:
gpui_macros(Idx::<CrateData>(269)) -> gpui(Idx::<CrateData>(264)),
alternative path: gpui(Idx::<CrateData>(264)) ->
gpui_macros(Idx::<CrateData>(269))`

error after loading the project.

The PR fixes this by moving away the test to the "root" project.
2023-08-16 10:19:20 +03:00
Mikayla Maki 6958fae895 Add component traits to GPUI (#2850)
Release Notes:

- N/A
2023-08-15 15:53:12 -07:00
Mikayla 5f9984e246 move component into gpui 2023-08-15 15:44:59 -07:00
Max BrunsfeldandMikayla 07f71c67b5 Simplify Component implementation
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-15 15:26:02 -07:00
KCaverly 928f546fae left align buffer search with new structure 2023-08-15 23:18:03 +01:00
Kirill Bulatov ccba4ff141 Support editor::SelectAll in Terminal (#2848)
![image](https://github.com/zed-industries/zed/assets/2690773/3aae1e6a-9993-4e65-8ed1-20f2f4b452df)

Allows to use `editor::SelectAll`(`cmd-a` by default) in Terminal to
select all text in it, for future copying.
Currently, does not try to be smart and trim the selected whitespaces
after the last prompt, and copies them too.

Release Notes:

- Support `editor::SelectAll` in Terminal
2023-08-15 23:59:26 +03:00
Joseph T. Lyons 92e3381eb3 Associate additional file extensions with known languages (#2847)
Going to do these in batches.  Here is the first one.

Release Notes:

- Associated additional file extensions with known languages
(([#633](https://github.com/zed-industries/community/issues/633)),
([#1822](https://github.com/zed-industries/community/issues/1822))).
    - C++: `cxx`, `hxx`, `inl`
    - JavaScript: `cjs`
    - Python: `mpy`
    - TypeScript: `cts`, `d.cts`, `d.mts`, `mts`
2023-08-15 16:46:42 -04:00
Kirill Bulatov 661229e647 Support editor::SelectAll in Terminal 2023-08-15 23:43:32 +03:00
Joseph T. Lyons c2589d9efa Associate extensions with language 2023-08-15 16:33:02 -04:00
KCaverlyandmaxbrunsfeld c817d047fc refactor buffer_search to reduce redundancy and simplying height management
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-08-15 20:04:14 +01: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
KCaverly a74ea95faf fix spacing on editor magnifying glass icon 2023-08-15 15:05:39 +01: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
Piotr OsiewiczandKyle bc42a78c49 Refactor buffer search UI rendering in a quest to find the meaning of life.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:27:57 +02:00
Kirill Bulatov 22420ec3dc Optimize query ranges tracking 2023-08-14 16:19:44 +03:00
Piotr OsiewiczandKyle 45342b6865 buffer: Extract columns to separate objects.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:14:57 +02:00
Piotr OsiewiczandKyle 275d92c0dc Extract columns into separate objects.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:13:17 +02:00
Kirill Bulatov e5fc5673ce Fix hint tests, add a char boundary bug test 2023-08-14 16:01:02 +03:00
Piotr OsiewiczandKyle 05018dfbd8 Add more padding to dismiss button.
Add a style for mode buttons group margin

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:01:01 +02:00
Piotr OsiewiczandKyle 10a39f6d62 Fix double borders in mode buttons.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 14:43:06 +02:00
Piotr OsiewiczandKyle b3ffb9921d nav_button: Fix double border between nav buttons.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 14:33:40 +02:00
Piotr OsiewiczandKyle 998fd9382f buffer: fix alignment of editor icon.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 14:31:14 +02:00
Piotr Osiewicz 9caa488195 Update option buttons text color 2023-08-14 12:35:33 +02:00
Piotr Osiewicz c9b7263a4a Align "Select all" to the center 2023-08-14 12:31:11 +02:00
Piotr Osiewicz 069a8728e4 Fix borders being cut off in buffer search 2023-08-14 12:28:35 +02:00
Piotr Osiewicz e4dc53fbda Style buffer modes like project modes 2023-08-14 12:25:59 +02:00
Piotr Osiewicz 69646f0e3c project_search: style filters button like the rest of the buttons 2023-08-14 12:20:59 +02:00
Piotr Osiewicz 18b10b2008 Add option_button_height style 2023-08-14 12:10:37 +02:00
Piotr Osiewicz 8476738afa project_search: Swap places of case-sens/whole-word 2023-08-14 11:59:42 +02:00