Mikayla Maki
aa7351041d
Add typo detection to CI ( #4107 )
...
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.
Release Notes:
- N/A
2024-01-17 17:13:47 -08:00
Piotr Osiewicz and Kirill
6cbc49e5f0
Editor docs ( #4097 )
...
Release Notes:
- N/A
---------
Co-authored-by: Kirill <kirill@zed.dev >
2024-01-18 00:48:37 +01:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos
2024-01-17 14:31:21 -08:00
Conrad Irwin
84171787a5
Track read_only per project and buffer
...
This uses a new enum to avoid confusing booleans
2024-01-03 19:31:43 -07:00
Max Brunsfeld and Mikayla
588976d27a
Remove 2 suffix for editor
...
Co-authored-by: Mikayla <mikayla@zed.dev >
2024-01-03 10:58:57 -08:00
Kirill Bulatov
eee63835fb
Exclude more ignored/worktree-less/project-less buffers from inlay hint requests
2023-11-23 10:30:52 +02:00
Kirill Bulatov
40104c06e2
Sort hint request ranges before asserting to avoid flackiness
2023-10-19 11:05:47 +03:00
Kirill Bulatov
afa7045847
Tone down inlay hint update logs
2023-09-22 17:04:11 +03:00
Kirill Bulatov
8c1df5afa2
Empty both hint cache storages correctly
2023-09-15 10:33:32 +03:00
Kirill Bulatov
4e9f0adcef
Improve inlay hint cache lookup
2023-09-14 23:31:50 +03:00
Kirill Bulatov
9b43acfc88
Remove useless background highlights code
2023-09-14 22:18:30 +03:00
Kirill Bulatov
5cf51211b6
Use better names, simplify
2023-08-27 00:01:31 +03:00
Kirill Bulatov
73937876b6
Properly omit throttled hint queries
2023-08-26 21:12:04 +03:00
Kirill Bulatov
f8a8b998ce
Properly react on excerpts drop
2023-08-26 15:21:45 +03:00
Kirill Bulatov
2a42a08f46
Invalidate skipped throttled hint fetch tasks' ranges
2023-08-26 14:47:42 +03:00
Kirill Bulatov
3fc48fc277
Log LSP inlay hint path
2023-08-26 13:46:55 +03:00
Kirill Bulatov
e6fb909d89
Limit LSP non-invalidating queries
2023-08-26 13:06:50 +03:00
Kirill Bulatov
2b007930a9
Remove query ranges for failed inlay hint requests
2023-08-26 12:09:12 +03:00
Kirill Bulatov
e6c4802488
Properly clip request offsets
2023-08-26 02:54:50 +03:00
Max Brunsfeld
404f76739c
Format let-else statements
2023-08-25 10:11:32 -07:00
Kirill Bulatov
44c340b5f2
Properly invalidate the hint cache
2023-08-25 17:33:17 +03:00
Kirill Bulatov
2b95f0580e
Fix the tests
2023-08-25 16:25:43 +03:00
Kirill Bulatov
c10c3e2b54
Only invalidate when doing first, visible range query
2023-08-25 15:16:55 +03:00
Kirill Bulatov
a63e1571dc
Defer querying inlay hints for invisible editor ranges
...
This way, only the visible part gets frequently queried on typing (and
hint /refresh requests that follow), with queries for invisible ranges
cancelled eagerly.
2023-08-25 15:16:55 +03:00
Kirill Bulatov
f19c659ed6
Add link_go_to_definition test for inlays
2023-08-25 14:26:17 +03:00
Kirill Bulatov
abd2d012b1
Properly binary search cached inlay hints
2023-08-25 14:26:17 +03:00
Kirill Bulatov
3c55c933d4
Be more lenient with hint resolution, always return some hint
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
d34491e822
Draft inlay hint part hover detection
2023-08-25 14:26:17 +03: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 and Mikayla Maki
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
5c3d563f0f
Draft quick actions bar
2023-08-16 23:38:11 +03: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
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
afcc0d621b
WIP
2023-08-03 17:03:39 -06: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
Kirill Bulatov
3058a96dee
Clean up stale conflicting hints
2023-07-19 15:29:00 +03:00
Kirill Bulatov
748e7af5a2
Add a test
2023-07-11 17:10:34 +03:00