Kirill Bulatov
4cc9f2f525
Highlight inlay hint parts on cmd-hover
...
Co-Authored-By: Antonio <antonio@zed.dev>
2023-08-25 14:26:17 +03:00
Kirill Bulatov
f8874a726c
Attempt to highlight inlays
2023-08-25 14:26:17 +03:00
Kirill Bulatov
6c5761d05b
Pass inlay highlight information
2023-08-25 14:26:17 +03:00
Kirill Bulatov
477fc865f5
Properly resolve inlay label parts' locations and buffers
2023-08-25 14:26:17 +03:00
Kirill Bulatov
7eab18ec89
Pass inlay go to definition data
2023-08-25 14:26:17 +03:00
Kirill Bulatov
ac86bbac75
Prepare for hover functionality refactoring
2023-08-25 14:26:17 +03:00
Kirill Bulatov
80e8714241
Send inlay hint resolve requests
2023-08-25 14:26:17 +03:00
Kirill Bulatov
3434990b70
Store inlay hint resolve data
2023-08-25 14:26:17 +03:00
Kirill Bulatov
d1cb0b3c27
Properly detect hovered inlay hint label part
2023-08-25 14:26:17 +03:00
Kirill Bulatov
d34491e822
Draft inlay hint part hover detection
2023-08-25 14:26:17 +03:00
Antonio Scandurra
66a496edd7
Allow generating code without editing it
2023-08-25 12:16:28 +02:00
Antonio Scandurra
c1bd035875
Rework inline assistant
2023-08-25 11:39:27 +02:00
Max Brunsfeld
a95dcfa8bc
Make channel notes view searchable and navigable via pane history
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 17:18:18 -07:00
Max Brunsfeld
24141c2f16
Ensure collaborators cursor colors are the same in channel buffers as in projects
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 11:31:41 -07:00
Mikayla
199be8241c
Add following into channel notes
...
co-authored-by: max <max@zed.dev>
2023-08-24 11:25:20 -07:00
Antonio Scandurra
71a5964c18
Rename merge_transaction_into
to merge_transactions
2023-08-24 14:26:42 +02:00
Max Brunsfeld
7e83138805
Start work on showing consistent replica ids for channel buffers
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:37:01 -07:00
Antonio Scandurra
e4f49746e1
Group modal assistant edits into the same transaction
...
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 17:09:15 +02:00
Nathan Sobo
1bc4f22373
Rework element system, phase 1 ( #2881 )
...
This is a deep cut. There's still more work to do until we start
building UI with this. I've approached this as additively as possible,
but I've made a few changes to the rest of the code that I think would
be good to upstream before proceeding too much further.
Most of the interesting pieces are in gpui/playground, which is a
standalone binary that opens a single window and renders a new kind of
element. The layout of these new elements is provided by the taffy
layout engine crate, which conforms to web conventions. The idea is that
playground is relatively cheap to build and work on. As concepts
coalesce in playground, we can drop them into gpui and start
transitioning.
2023-08-23 08:26:38 -06:00
Nathan Sobo
d375f7992d
Merge branch 'main' into divs
2023-08-22 16:35:56 -06:00
Conrad Irwin
27ba77b16f
Ensure editor clipboard contains \n too
2023-08-22 13:52:04 -06:00
Conrad Irwin
33d7fe02ee
Rewrite paste
...
- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
2023-08-22 13:27:57 -06:00
Piotr Osiewicz
ccb3f6748c
chore: fmt
2023-08-22 18:14:07 +02:00
Piotr Osiewicz
ccb9b5d278
Query char_kind for completion triggers.
...
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2023-08-22 18:12:05 +02:00
Piotr Osiewicz
d27cebd977
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 10:35:20 +02:00
Conrad Irwin
168a213a44
Add test for word characters in vim
2023-08-21 22:37:14 -06:00
Piotr Osiewicz
42b0c5dfdd
Remove comment;for real now
2023-08-22 01:04:55 +02:00
Piotr Osiewicz
bca2d02a61
Revert "Remove dead comment"
...
This reverts commit 046759a366
.
2023-08-22 01:04:15 +02:00
Piotr Osiewicz
046759a366
Remove dead comment
2023-08-22 01:01:27 +02:00
Piotr Osiewicz
6137d88a54
Merge branch 'main' into Z-2819
2023-08-21 17:41:27 +02:00
Piotr Osiewicz
ab5bd0ac5a
Use new char_kind (parameterized by language)
2023-08-21 17:39:38 +02:00
Piotr Osiewicz
3e8522b5f2
WIP: Saved state from Friday.
...
Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-21 17:09:03 +02:00
Max Brunsfeld
1c46749ad7
Fix regression in Buffer::language_scope_at
...
Co-authored-by: Julia <julia@zed.dev>
2023-08-18 12:58:09 -07:00
Conrad Irwin
e3c0e93e46
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
d1aa82bb48
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 Bulatov
269dad5a9c
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
7598030102
Tidy-up
2023-08-16 22:29:28 -06:00
Kirill Bulatov
7334bdccbf
Better multibuffer tests
2023-08-16 23:38:11 +03:00
Kirill Bulatov
f9131f657e
Use InlayHint instead of Inlay where appropriate
2023-08-16 23:38:11 +03:00
Kirill Bulatov
9c6135f47a
Test hints toggle
2023-08-16 23:38:11 +03:00
Kirill Bulatov
0f650acc23
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
0b93e490a5
Improve toggle UI, fix inlays update speed
2023-08-16 23:38:11 +03:00
Kirill Bulatov
5c3d563f0f
Draft quick actions bar
2023-08-16 23:38:11 +03:00
Conrad Irwin
7f06191c9f
Disable autoindent in visual block insert mode
2023-08-16 10:44:59 -06:00
Conrad Irwin
1b4dd49b1d
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
404b1aa65a
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
22da42fc69
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
e5eed29c72
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
fb90eada70
Merge branch 'main' into vim-visual-selection
2023-08-14 15:29:33 -06:00
Conrad Irwin
5b37cdcb04
Better tests
2023-08-14 15:03:16 -06:00
Nathan Sobo
740b105330
Merge branch 'main' into taffy
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 13:50:21 -06:00
Kirill Bulatov
e0d011e354
Better assert multibuffer edit test results
2023-08-14 20:12:35 +03:00
Kirill Bulatov
4b3273182a
Do not filter out hints to be removed
2023-08-14 19:20:20 +03:00
Kirill Bulatov
336fbb3392
Clip offsets in inlay hint queries
2023-08-14 18:39:30 +03:00
Kirill Bulatov
558367dc8b
Optimize query ranges tracking
2023-08-14 16:19:44 +03:00
Kirill Bulatov
87e6651ecb
Fix hint tests, add a char boundary bug test
2023-08-14 16:01:02 +03:00
Kirill Bulatov
449c009639
Properly generate ranges to query
2023-08-14 11:25:02 +03:00
Kirill Bulatov
56f89739f8
Do not add duplicate hints to the cache
2023-08-14 11:25:02 +03:00
Kirill Bulatov
0e2a1fc149
Query inlay hints for parts of the file
2023-08-14 11:25:02 +03:00
Kirill Bulatov
708409e06d
Query hints on every scroll
2023-08-14 11:25:02 +03:00
Kirill Bulatov
5d2750e0d4
Hide inlay cache fields
2023-08-14 11:25:02 +03:00
Nathan Sobo
65123e6eed
Allow individual corner radii on drop shadows
2023-08-12 10:58:08 -06:00
Nathan Sobo
84dc4090bd
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
5e36040533
Put a Taffy layout engine on window
2023-08-12 00:58:11 -06:00
Piotr Osiewicz
ffffbbea1f
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
0bf607cd2d
WIP
2023-08-10 10:26:48 -06:00
Nathan Sobo
c95aecdd53
Merge branch 'main' into cells
2023-08-08 21:23:57 -06:00
Nathan Sobo
db96fb1307
Merge remote-tracking branch 'origin/main' into paint-context
2023-08-08 18:27:16 -06:00
Nathan Sobo
54ca5f1d44
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
1aff642981
Do not highlgiht selections at all over the threshold
2023-08-08 13:09:27 +02:00
Nathan Sobo
f0da6b05fd
Remove TestAppContext::add_view
...
Instead, we now call this on window handles.
2023-08-07 22:46:48 -06:00
Nathan Sobo
d687c3d81f
Merge remote-tracking branch 'origin/main' into window-handles
2023-08-07 22:07:20 -06:00
Nathan Sobo
f2be3181a9
Move window-related methods from TestAppContext to AnyWindowHandle
2023-08-07 20:23:04 -06:00
Nathan Sobo
486f5bc6ca
Get compiling
2023-08-07 19:08:58 -06:00
Piotr Osiewicz
371c669e00
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
b0fc6da55b
Use display maps
2023-08-08 02:37:27 +02:00
Piotr Osiewicz
241d3951b8
Remove redundant argument
2023-08-08 02:25:30 +02:00
Piotr Osiewicz
42e1221357
Add upper bound limit. Remove dbg! statements
2023-08-08 02:17:11 +02:00
Piotr Osiewicz
fa16895976
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
ca21626064
Baseline: Improve selection rendering for large quantities from 270ms to 90ms
2023-08-07 23:32:27 +02:00
Conrad Irwin
19eb280351
Fix selection background too
...
Refactor code to centralize the logic too
2023-08-07 19:01:04 +01:00
Nathan Sobo
adc50469ff
WIP
2023-08-06 12:45:31 -06:00
Joseph T. Lyons
1abb6a0176
Expand empty selections to cover full word and fix bugs
2023-08-05 11:31:21 -04:00
Joseph T. Lyons
12e8f417e4
Add more convert to case commands
...
ConvertToTitleCase
ConvertToSnakeCase
ConvertToKebabCase
ConvertToUpperCamelCase
ConvertToLowerCamelCase
2023-08-04 22:45:26 -04:00
Joseph T. Lyons
8c98b02e45
Add convert to {upper,lower} case
commands
...
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-08-04 15:10:33 -04:00
Conrad Irwin
22927fa1d7
Fix visual selection cursor in multibuffers
2023-08-04 14:39:16 +01:00
Nathan Sobo
379652f074
Merge branch 'main' into cells
2023-08-03 19:33:04 -06:00
Nathan Sobo
d3c1966d96
WIP: Return WindowHandle<V: View> from AppContext::add_window ( #2820 )
...
Instead of returning a usize for the window id, I'm instead returning a
`WindowHandle<V: View>` where `V` is the type of the window's root view.
@as-cii helped me with a cool technique using generic associated types
where methods on `WindowHandle` can return either T or Option<T>
depending on the `BorrowWindowContext::Result` associated type.
Some example usage...
```rs
let window = cx.add_window(|cx| MyView::new(cx));
let my_view = window.root(cx); // If cx is TestAppContext, returns MyView. Otherwise returns Option<MyView>, because the window could be closed.
```
This isn't insanely beneficial on its own, but I think it will help
clean up our testing story. I'm planning on making `window` more useful
in tests for laying out elements, etc.
- [x] Rework tests that call `add_window` 😅 to expect only a window in
return.
- [x] Get tests passing
- [x] 🚬 test
2023-08-03 18:45:51 -06:00
Nathan Sobo
485c0a482e
Don't refcount window handles
2023-08-03 17:11:47 -06:00
Nathan Sobo
afcc0d621b
WIP
2023-08-03 17:03:39 -06:00
Joseph T. Lyons
ee1b4a52cc
Add PathExt
trait ( #2823 )
...
This PR adds a `PathExt` trait. It pulls in our existing `compact()`
function, as a method, and then adds a method, and testing, for
`icon_suffix()`. A test was added to fix:
- https://github.com/zed-industries/community/issues/1877
Release Notes:
- Fixed a bug where file icons would not be registered for files with
with `.` characters in their name
([#1877 ](https://github.com/zed-industries/community/issues/1877 )).
2023-08-03 18:57:43 -04:00
Nathan Sobo
884cee6dfd
Get tests compiling returning WindowHandle<V: View> from add_window
2023-08-02 14:05:03 -06:00
Max Brunsfeld
a127b0d3e6
Fix warnings surfaced in Rust 1.71
2023-08-02 09:19:23 -07:00
Conrad Irwin
5f6535e92b
TEMP
2023-08-02 15:06:46 +01:00
Joseph T. Lyons
eb26fb2d45
Fix variable names
2023-08-01 11:52:53 -04:00
Mikayla Maki
88474a6048
Clip wrap guides from under the scrollbar
2023-07-31 10:54:29 -07:00
Mikayla Maki
d58f031696
disable wrap guides in the assitant panel
2023-07-28 22:27:36 -07:00
Conrad Irwin
645c149344
Fix visual selection of trailing newline
2023-07-28 22:38:39 -06:00
Mikayla Maki
d3b89e16f2
Make wrap guides respect scroll position
2023-07-28 14:56:13 -07:00
Conrad Irwin
9cb0ce7745
Review
2023-07-28 15:36:14 -06:00