b485554e64
Take an Into<AnyViewHandle> in ChildView::new
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-27 17:54:45 +01:00
Antonio Scandurra and Nathan Sobo
df51f7ae0a
Show non-disk-based diagnostics in project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-27 16:23:50 +01:00
Antonio Scandurra
34f4346530
Style empty project diagnostics state
2022-01-27 10:21:26 +01:00
Max Brunsfeld
3588e8276c
Increase diagnostic editor's vertical scroll margin
...
This way, the first path header will always be fully visible when
you move your cursor to the beginning of the multibuffer.
2022-01-26 10:23:41 -08:00
Max Brunsfeld
ecb419e20d
Render header blocks as horizontall fixed (like the gutter)
...
Tweak editor layout to perform horizontal autoscroll before
laying out the blocks, so that they can access the scroll position.
2022-01-25 17:19:38 -08:00
Max Brunsfeld and Nathan Sobo
88da36a94d
Tweak diagnostic header styling
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-25 15:33:49 -08:00
Max Brunsfeld
2313283b26
Render diagnostic status bar icon with icons
2022-01-25 15:33:34 -08:00
Max Brunsfeld and Nathan Sobo
8951a4d520
Show icons and counts in the project diagnostics tab
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-25 12:31:55 -08:00
Max Brunsfeld
0bee9ad4f8
Merge branch 'project-diagnostics-pinned-tab' into style-project-diagnostics
2022-01-25 12:20:37 -08:00
Max Brunsfeld and Nathan Sobo
d034a5d8dc
Scale diagnostic header and message text with editor font
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-25 12:10:11 -08:00
Nathan Sobo and Max Brunsfeld
764691a9cd
Scale diagnostic headers icons with editor font and right align w/ line numbers
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-25 12:40:53 -07:00
Antonio Scandurra and Nathan Sobo
5519a872ff
Style block decorations
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-25 17:07:12 +01:00
Antonio Scandurra
78d341f74f
Format messages within backticks using bold instead of with a background
2022-01-25 15:50:49 +01:00
Antonio Scandurra
d6797092dc
Show error code in diagnostic header
2022-01-25 15:23:58 +01:00
Antonio Scandurra
491f1f47d5
Display icon next to primary message
2022-01-25 15:15:03 +01:00
Antonio Scandurra
972d3a33ad
Restyle diagnostic headers
2022-01-25 12:23:24 +01:00
Nathan Sobo
59bbb08068
Defer pane interaction when opening excerpts in diagnostics view
...
Activating a new item causes the current item to be deactivated. We're the current item, but we're on the stack, so we panic if we try to do this synchronously. If we use defer to wait until we're off the stack it works.
2022-01-22 13:23:08 -07:00
Antonio Scandurra
41100c4439
Make add_local_worktree private and use find_or_create_local_worktree
...
The former always adds a worktree, even if we have one already in the
project and that could be misused. The public API should always search
for a local worktree containing the requested path first so that the
project can uphold invariants about which worktrees it has.
2022-01-22 11:23:00 +01:00
Max Brunsfeld and Nathan Sobo
9d088c0b76
Get diagnostics crate's tests passing
...
Update diagnostics on project instead of on worktree
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-21 18:02:10 -08:00
Max Brunsfeld and Nathan Sobo
8d9db1f304
Move buffers from worktree to project
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-21 15:46:27 -08:00
Nathan Sobo
5e45a8f1aa
Revert "Replace project_path with project_entry in workspace::{Item, ItemView}"
...
This reverts commit c5fe187527 .
2022-01-21 11:07:10 -07:00
Antonio Scandurra
ba96ca0b1b
Remove weak worktrees from project when nobody references them
...
Also, avoid showing them in the project panel as well as in the
contacts panel.
2022-01-21 14:34:14 +01:00
a8684fe004
Make navigation history work with project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-20 18:21:48 +01:00
Antonio Scandurra
3c1b7e26c9
WIP
2022-01-20 18:11:37 +01:00
Antonio Scandurra and Nathan Sobo
ade37e946c
Make "go to definition" work in project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-20 17:30:30 +01:00
Antonio Scandurra
95f2e7b36c
Omit worktree id when emitting Event::DiskBasedDiagnosticsUpdated
...
Sometimes we will have more than one worktree associated with the same
language server and in that case it's unclear which worktree id we should
report an event for.
2022-01-20 10:13:27 +01:00
Antonio Scandurra
ef78225a5d
Return a Task<Result<()>> in {ItemView,Buffer,MultiBuffer}::save
2022-01-20 09:58:24 +01:00
Max Brunsfeld
7d9d20a661
Get tests passing, centralize more diagnostic logic in Project
2022-01-19 16:32:55 -08:00
Max Brunsfeld
575def57db
Move logic for starting language servers to the project
2022-01-19 14:05:06 -08:00
Antonio Scandurra and Max Brunsfeld
841827f873
Route save_as via the Project
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-19 18:44:48 +01:00
Antonio Scandurra
c5fe187527
Replace project_path with project_entry in workspace::{Item, ItemView}
2022-01-19 15:56:04 +01:00
Antonio Scandurra
6702f048eb
Rename Navigation to NavHistory
2022-01-19 15:27:34 +01:00
Antonio Scandurra and Max Brunsfeld
3f2ea66672
Populate backward/forward stacks upon item deactivation
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-17 18:57:31 +01:00
Antonio Scandurra
a935ebfd75
Allow splitting of project diagnostics
2022-01-13 10:24:41 +01:00
Max Brunsfeld
45672c4378
Add unit test for diagnostic + path header ordering
2022-01-12 11:34:57 -08:00
Max Brunsfeld and Nathan Sobo
024ffdeafe
Show error+warning counts in project diagnostics tab
...
Allow workspace items' tab contents to be arbitrary elements
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 10:51:28 -08:00
Max Brunsfeld and Nathan Sobo
5a0ebbfd08
Ensure path headers appear before first diagnostic header
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 10:51:28 -08:00
Max Brunsfeld
7f3c046cda
Adjust project diagnostics test to reflect new block structure
2022-01-12 10:51:08 -08:00
Max Brunsfeld
8442bdb3ab
Tweak theming of project diagnostics
2022-01-12 10:51:08 -08:00
Max Brunsfeld
e21914a059
Deduplicate path names in the project diagnostics view
2022-01-12 10:51:08 -08:00
Max Brunsfeld and Nathan Sobo
cefabdaeb9
In diagnostics editor, attempt to open excerpts in a different pane
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-10 16:33:25 -08:00
Max Brunsfeld and Nathan Sobo
7887ddc24f
Add files to project diagnostics view in order
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-10 16:17:56 -08:00
Antonio Scandurra
ed68da4503
Fix diagnostic unit test assertions
2022-01-10 14:28:25 +01:00
Antonio Scandurra
9d52e4851b
🎨
2022-01-10 12:14:52 +01:00
Antonio Scandurra
9521be8224
Use a new Workspace::activate_item API in project diagnostics
...
Previously, we would only activate the pane without switching the
pane's *active item*.
2022-01-10 10:10:11 +01:00
Max Brunsfeld
dfab726dd9
When selections lose their excerpts, move them to the next primary diagnostic
2022-01-07 14:53:33 -08:00
Max Brunsfeld and Nathan Sobo
4b7584e1a2
Reuse views when moving between diagnostic view and editors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 11:00:12 -08:00
Max Brunsfeld and Nathan Sobo
4ca8d56b7f
Finish implementing ProjectDiagnostics::open_excerpts
...
* Build workspace item views with a reference to the workspace
* Add randomized test for MultiBuffer::excerpted_buffers and fix a small bug
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 09:59:27 -08:00
Antonio Scandurra and Nathan Sobo
c28fd392cb
Refactor opening workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 17:38:37 +01:00
Antonio Scandurra and Nathan Sobo
7ebeddd2c2
WIP: Add keybinding to open buffers under cursors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 16:12:50 +01:00