Commit Graph
544 Commits
Author SHA1 Message Date
Max BrunsfeldandNathan Sobo 3f2f57b77d Keep selections at the top of the project diagnostics view when it is first populated
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 17:01:13 -08:00
Max Brunsfeld e9b63f06a0 Revert "Remove special handling of multi-line primary diagnostic messages and fix tests"
This reverts commit 05c8db05ca.
2022-01-06 14:38:13 -08:00
Nathan SoboandAntonio Scandurra b12936bc38 Re-focus diagnostics editor when transitioning from an empty to a populated state
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-06 08:35:31 -07:00
Antonio ScandurraandNathan Sobo a56b3c7fb9 Polish rendering of inline errors
- Don't soft-wrap
- Render multiple lines

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 16:17:53 +01:00
Antonio Scandurra e89b1d8354 Maintain excerpt ordering correctly when some errors don't change 2022-01-06 15:33:02 +01:00
Antonio Scandurra 3ec22e7581 Wire up refresh_anchors in Editor::refresh_selections and call it 2022-01-06 15:32:37 +01:00
Antonio Scandurra 386b1d4719 Remove invalid excerpts as opposed to styling them differently 2022-01-05 18:21:17 +01:00
Antonio Scandurra fbb347523a Show a message when no diagnostics are available 2022-01-05 17:25:03 +01:00
Antonio ScandurraandMax Brunsfeld 7525741533 Merge branch 'main' into polish-project-diagnostics
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-04 18:35:28 +01:00
Antonio Scandurra 46c53aa313 Re-enable cargo check for rust-analyzer 2022-01-04 18:26:16 +01:00
Antonio Scandurra dd5ba61ab6 Rip out "diagnostic providers" 2022-01-04 16:32:17 +01:00
Max Brunsfeld cd7ae96c44 Allow the zed app to connect to both the old and new rpc endpoints
In the case of the new Next.js app, the app will follow a redirect
from 'zed.dev/rpc' to the subdomain where the rust service is hosted.
Until then, the app will connect directly to zed.dev/rpc.
2022-01-03 15:29:26 -08:00
Nathan Sobo 05c8db05ca Remove special handling of multi-line primary diagnostic messages and fix tests 2021-12-24 13:47:45 -07:00
Nathan Sobo c704166cfc Make diagnostics disk-based in test 2021-12-24 13:33:11 -07:00
Antonio Scandurra de3a7f8a48 Remove duplication when assigning diagnostics and hardcode provider names 2021-12-24 12:07:26 +01:00
Max Brunsfeld 83741239e8 wip 2021-12-23 23:10:28 -08:00
Max Brunsfeld ab075ca1a1 Get code compiling with some todos 2021-12-23 14:21:10 -08:00
Antonio ScandurraandNathan Sobo 1a28980dc8 Show only disk-based diagnostics in ProjectDiagnosticsEditor
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-23 16:47:54 +01:00
Antonio ScandurraandNathan Sobo 6bb9757b1f Only preserve excerpts for invalid diagnostics if they contain cursors
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-23 16:33:50 +01:00
Antonio Scandurra db9f25d6ad Use a different invalidation strategy for project-wide diagnostics 2021-12-23 15:41:43 +01:00
Max Brunsfeld 6d74da5710 Use MultiBuffer::insert_excerpt_after to update project diagnostics view 2021-12-22 18:00:53 -08:00
Max Brunsfeld 4d8d3491e7 WIP - Start work on updating project diagnostics view 2021-12-21 16:39:23 -08:00
Max Brunsfeld 3c1b8a106b Fix context line handline in project diagnostic view 2021-12-21 11:46:47 -08:00
Antonio ScandurraandMax Brunsfeld c122723122 Render excerpt headers using DisplayMap::insert_blocks
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-12-21 18:32:27 +01:00
Antonio Scandurra b4a4c15e86 WIP: Insert blocks in BlockMap for MultiBuffer headers 2021-12-21 17:38:03 +01:00
e6e633c69c Send worktree info only when sharing worktree
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-20 11:36:59 -08:00
Antonio ScandurraandNathan Sobo 746d9b93e0 Allow saving of all buffers contained in project diagnostics editor
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-17 16:48:16 +01:00
Antonio Scandurra 3dc1435ddc Implement MultiBuffer::{is_dirty,has_conflict} 2021-12-17 15:33:09 +01:00
Antonio Scandurra 21a4e89e98 Display filename on the first excerpt's header for a group 2021-12-17 13:49:21 +01:00
Antonio Scandurra 3f71306ec1 Enhance diagnostic unit test and correctly display primary diagnostic
That is, if the diagnostic has more than one line we will display the
first line in the header and all the other message lines at the error
location.
2021-12-17 12:16:09 +01:00
Max Brunsfeld 3fe4adf041 WIP - Improve project diagnostic context rendering 2021-12-16 18:34:29 -08:00
Max Brunsfeld a7b89e4e51 Correctly incorporate editor settings into diagnostic header rendering 2021-12-16 16:36:33 -08:00
Max Brunsfeld 1892193c59 Transfer focus from ProjectDiagnostics view to its editor 2021-12-16 14:14:22 -08:00
Antonio Scandurra 5f2ebe12eb Allow specifying MAX_EXCERPTS via an env variable in random tests 2021-12-16 12:28:54 +01:00
2fdf3937b3 Ensure muiltibuffer anchors are contained within their excerpt ranges
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-12-15 10:52:27 -08:00
Nathan SoboandMax Brunsfeld 33ac740f31 Group diagnostics by primary
Render primary message above the excerpt and supporting messages as block decorations with a `Below` disposition. This is still super rough.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-14 18:26:42 -07:00
Nathan SoboandMax Brunsfeld 89d1d22afb Render basic diagnostic messages in project diagnostics view
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-14 17:00:57 -07:00
Nathan SoboandMax Brunsfeld 855592babc Implement MultiBufferSnapshot::excerpt_headers_in_range
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-14 16:24:48 -07:00
Antonio Scandurra e95eab89f4 Remove stray log statement 2021-12-14 12:01:19 +01:00
Antonio Scandurra 96291408bd Display a rudimentary project diagnostic view on alt-shift-d 2021-12-14 11:32:05 +01:00
Max Brunsfeld 4dc84c6dca WIP 2021-12-13 17:44:20 -08:00
Max Brunsfeld 1bbc223cc3 Store diagnostic summaries on worktrees 2021-12-13 16:36:53 -08:00
df57433d59 Get things compiling with diagnostics on worktree
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-13 11:15:03 -08:00
Antonio ScandurraandNathan Sobo e3bf3af3f5 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-13 16:46:35 +01:00