ZIm/crates/project/src
Kirill Bulatov 5ae93ce68d
Add initial inline diagnostics support (#25297)
https://github.com/user-attachments/assets/eb881707-e575-47ef-9ae0-67d8085d8065

Closes https://github.com/zed-industries/zed/pull/22668
Closes https://github.com/zed-industries/zed/issues/4901

Takes https://github.com/zed-industries/zed/pull/22668 and fixes all
review items on top.
Inline diagnostics are disabled by default, but can be enabled via
settings permanently, or temporarily toggled with the `editor:
ToggleInlineDiagnostics` action and the corresponding editor menu item
<img width="242" alt="image"
src="https://github.com/user-attachments/assets/8e177511-4626-4434-902b-d6aa4d3fafd0"
/>

Inline diagnostics does not show currently active diagnostics group, as
it gets inline into the editor too, inside the text.
Inline git blame takes precedence and is shown instead of the
diagnostics, edit predictions dim the diagnostics if located on the same
line.

One notable drawback of the implementation is the inability to wrap,
making inline diagnostics cut off the right side:


![image](https://github.com/user-attachments/assets/6e87268a-b51a-4a2b-8b8d-01d932c62fea)

(same as inline git blame and other elements to the right of the text)
Given that it's disabled by default and go to next/prev diagnostics will
show them better, seems fine to leave in the first iteration.


Release Notes:

- Added initial inline diagnostics support

---------

Co-authored-by: Paul J. Davis <paul.davis@tiledb.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-20 23:39:47 +00:00
..
lsp_command Remove language::markdown (#25136) 2025-02-19 08:55:36 -07:00
project_tree cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
buffer_store.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
color_extractor.rs Simplify static expression to a constant (#23193) 2025-01-15 19:31:21 +00:00
connection_manager.rs Remove more references to 'model' in GPUI APIs (#23693) 2025-01-27 04:00:27 +00:00
debounced_delay.rs Rename model based variable names to entity (#24198) 2025-02-04 10:24:35 -08:00
direnv.rs Environment loading fixes (#19144) 2024-10-16 12:14:40 +02:00
environment.rs Improve support for tcsh/csh as login shells (#25122) 2025-02-19 15:31:42 -05:00
git.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
image_store.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
lsp_command.rs Remove language::markdown (#25136) 2025-02-19 08:55:36 -07:00
lsp_ext_command.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00
lsp_store.rs Use line-based and word-based diff when reloading and formatting buffers (#25129) 2025-02-20 00:56:01 +00:00
prettier_store.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
project.rs Revert "file_finder: Remove common segments of long paths in search results (#25049)" (#25163) 2025-02-19 15:32:29 +00:00
project_settings.rs Add initial inline diagnostics support (#25297) 2025-02-20 23:39:47 +00:00
project_tests.rs Use line-based and word-based diff when reloading and formatting buffers (#25129) 2025-02-20 00:56:01 +00:00
project_tree.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
search.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
search_history.rs project search: Persist search history across session (#9932) 2024-04-02 11:13:18 +02:00
task_inventory.rs windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
task_store.rs Rename model based variable names to entity (#24198) 2025-02-04 10:24:35 -08:00
terminals.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
toolchain_store.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
worktree_store.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
yarn.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00