Commit Graph
5172 Commits
Author SHA1 Message Date
Conrad Irwin eb83265856 Fix cursor adjustment on scroll
Fixes: zed-industries/community#1929

Also preserves visual modes correctly.
2023-08-18 11:23:43 -06:00
Conrad Irwin b855d248bd vim visual block (#2849)
Release notes:

- vim: add Visual Block mode
([#984](https://github.com/zed-industries/community/issues/984)),
([#1415](https://github.com/zed-industries/community/issues/1415)).
- vim: add support for `a<object>` and `i<object>` in visual modes
- vim: fix scroll shortcuts (`ctrl-{f,b,d,u,e,y}`) in visual modes
- allow `shift-enter` to type a newline.
2023-08-18 09:55:40 -06:00
Kirill BulatovandJulia Risley 4eea7de73f Respect completion resolve server capabilities
Only query for additional edits if the server supports it

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-08-18 16:55:47 +03:00
Conrad Irwin 03e0c6d2d6 Tidy-up 2023-08-16 22:29:28 -06:00
Kirill Bulatov 56f5c6c788 Better multibuffer tests 2023-08-16 23:38:11 +03:00
Kirill Bulatov 08fcb3f10e Use InlayHint instead of Inlay where appropriate 2023-08-16 23:38:11 +03:00
Kirill Bulatov d9a90a3035 Test hints toggle 2023-08-16 23:38:11 +03:00
Kirill BulatovandMikayla Maki 4acb8eeabb Repaint inlays icon on inlays cache disabling/enabling
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-16 23:38:11 +03:00
Kirill Bulatov 5ce0d2244d Improve toggle UI, fix inlays update speed 2023-08-16 23:38:11 +03:00
Kirill Bulatov 7cd278f4b8 Draft quick actions bar 2023-08-16 23:38:11 +03:00
Conrad Irwin 17f8742a27 Disable autoindent in visual block insert mode 2023-08-16 10:44:59 -06:00
Conrad Irwin d37246dee7 Vim visual block mode
This isn't quite an exact emulation, as instead of using one selection
that is magically in "column mode", we emulate it with a bunch of zed
multi-selections (one per line).

I think this is better, as it requires fewer changes to the codebase,
and lets you see the impact of any changes immediately on all lines.

Fixes: zed-industries/community#984
2023-08-15 16:00:50 -06: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
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 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
Nathan SoboandMikayla Maki 64f61d293a Merge branch 'main' into taffy
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 13:50:21 -06: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
Nathan Sobo 8d32b7e0fa Allow individual corner radii on drop shadows 2023-08-12 10:58:08 -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
Nathan Sobo 3b82dbc0c1 Put a Taffy layout engine on window 2023-08-12 00:58:11 -06: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
Nathan Sobo bb9591415f WIP 2023-08-10 10:26:48 -06:00
Nathan Sobo 2ac55ed691 Merge branch 'main' into cells 2023-08-08 21:23:57 -06:00
Nathan Sobo ba8c733d80 Merge remote-tracking branch 'origin/main' into paint-context 2023-08-08 18:27:16 -06:00
Nathan Sobo e1dfc8e3ce Replace context methods that take a window id with methods on window handles (#2832)
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.
2023-08-08 17:51:37 -06:00
Piotr Osiewicz 6daa812d5d Do not highlgiht selections at all over the threshold 2023-08-08 13:09:27 +02:00
Nathan Sobo 337db743e9 Remove TestAppContext::add_view
Instead, we now call this on window handles.
2023-08-07 22:46:48 -06:00
Nathan Sobo 5bdfe4199e Merge remote-tracking branch 'origin/main' into window-handles 2023-08-07 22:07:20 -06:00
Nathan Sobo 8a187b0b25 Move window-related methods from TestAppContext to AnyWindowHandle 2023-08-07 20:23:04 -06:00
Nathan Sobo ce33bd19e5 Get compiling 2023-08-07 19:08:58 -06:00
Piotr Osiewicz 2afb207a6e Address review feedback.
Rename selected_rows to background_highlight_row_ranges.
Do not return any ranges if there are more than 50k results
2023-08-08 02:47:49 +02:00
Piotr Osiewicz 2287c07c9d Use display maps 2023-08-08 02:37:27 +02:00
Piotr Osiewicz 8863e75114 Remove redundant argument 2023-08-08 02:25:30 +02:00
Piotr Osiewicz 29465aa01a Add upper bound limit. Remove dbg! statements 2023-08-08 02:17:11 +02:00
Piotr Osiewicz 2b1b1be185 Do not query start of range if it's end is the same as the previous hunk's 2023-08-08 00:27:38 +02:00
Piotr Osiewicz d98ed0e958 Baseline: Improve selection rendering for large quantities from 270ms to 90ms 2023-08-07 23:32:27 +02:00
Conrad Irwin 66e4046734 Fix selection background too
Refactor code to centralize the logic too
2023-08-07 19:01:04 +01:00
Nathan Sobo d1e01ba625 WIP 2023-08-06 12:45:31 -06:00
Joseph T. Lyons 5ca419bd55 Expand empty selections to cover full word and fix bugs 2023-08-05 11:31:21 -04:00