Commit Graph
409 Commits
Author SHA1 Message Date
Antonio Scandurra 4182060386 Merge pull request #375 from zed-industries/more-project-diagnostics-styling
Last touches on project diagnostics for now
2022-01-27 16:47:05 +01:00
Antonio ScandurraandNathan Sobo c8c3f77580 Pause cursor blinking only when editor is focused
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 16:33:47 +01:00
Antonio ScandurraandNathan Sobo 2b2bf99359 Don't panic when ending transaction that wasn't started by the same editor
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 15:53:44 +01:00
Antonio ScandurraandNathan Sobo e8ea29213f Avoid grouping transactions created by different editors
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 15:51:46 +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 c165f42f71 Avoid showing selection strip on top of diagnostic headers 2022-01-26 10:23:40 -08:00
Antonio ScandurraandNathan Sobo b67959a504 Display squiggly underlines underneath text with diagnostics
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 15:52:40 +01: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 c17eadd038 Account for editor's full scroll width when laying out blocks
Compute the editor's scroll width earlier in layout and
store it on the layout state, rather than computing it repeatedly.
2022-01-25 16:31:14 -08:00
Max BrunsfeldandNathan Sobo 88da36a94d Tweak diagnostic header styling
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-25 15:33:49 -08:00
Max BrunsfeldandNathan 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 BrunsfeldandNathan 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 SoboandMax 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 ScandurraandNathan 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 0fb72d41e0 Remove Worktree::abs_path
I'd like to only have methods related to absolute paths on local worktrees, because it's not really possible to implement them on remote worktrees since we don't know the full path being shared and wouldn't have anything to do with it anyway if we did.
2022-01-22 14:44:58 -07:00
Nathan Sobo 84ae1c30d2 Remove worktree_path from File struct 2022-01-22 14:29:36 -07: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
Nathan Sobo a58caa2eb9 Disable the nav history when selecting a definition in a different buffer
When jumping between different buffers, we don't care about the cursor's previous location. When navigating backward, we want to jump directly to the site of the jump.
2022-01-20 21:33:16 -07: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 ScandurraandNathan Sobo 5229abd541 Center selections when going to definition
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-20 17:33:07 +01:00
Antonio ScandurraandNathan 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 ScandurraandNathan Sobo 88cc335db3 Change GoToDefinition binding to F12
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-20 15:43:02 +01:00
Antonio Scandurra b7b59c94fa WIP: Start on a GoToDefinition action for the editor 2022-01-20 12:26:04 +01:00
Antonio Scandurra ef78225a5d Return a Task<Result<()>> in {ItemView,Buffer,MultiBuffer}::save 2022-01-20 09:58:24 +01:00
Max Brunsfeld 09719a0bfc Always open buffers via the project 2022-01-19 14:48:54 -08:00
Max Brunsfeld 575def57db Move logic for starting language servers to the project 2022-01-19 14:05:06 -08:00
Antonio Scandurra 7ad9b2b0d7 WIP 2022-01-19 19:28:41 +01:00
Antonio ScandurraandMax 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
Max Brunsfeld bfe0cefa38 Avoid changing selection in buffer navigation dialogs
If an editor has highlighted_rows, autoscroll it to reveal those rows instead of
its cursor positions.
2022-01-18 17:29:33 -08:00
Max Brunsfeld ef52932a63 Add a unit test for navigation behavior at the editor level 2022-01-18 16:25:22 -08:00
Max Brunsfeld babaabb941 Push to navigation history based on jump distance instead of time 2022-01-18 15:02:49 -08:00
Antonio Scandurra d7d30d3303 Experiment with a more general way of pushing editor navigation entries 2022-01-18 18:03:10 +01:00
Antonio Scandurra ec7a343f4f Introduce a test to verify navigation 2022-01-18 10:03:56 +01:00
Antonio Scandurra f9ebc363a2 Use offset to restore navigation position if anchor can't be resolved 2022-01-18 09:59:28 +01:00
Max Brunsfeld 25b150c560 Navigate to previous positions in editors when using navigation history 2022-01-17 16:01:52 -08:00
Antonio ScandurraandMax 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 d1f435bcdc Start laying the foundation for a per-pane navigation system 2022-01-17 16:59:06 +01:00
e1bf476b29 Add select_first and select_last bindings to outline view
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 10:45:37 -08:00
499671b2c3 Match on names only when outline query has no spaces
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 09:16:29 -08:00
Antonio Scandurra 4956298db4 Allow matching of context items in outline view 2022-01-14 11:09:02 +01:00
Max Brunsfeld 3dd4c39edd Incorporate syntax highlighting into symbol outline view
Still need to figure out how to style the fuzzy match characters
now that there's syntax highlighting. Right now, they are
underlined in red.
2022-01-13 18:10:02 -08:00
Max Brunsfeld 09cc3bd94d Include highlighting runs in Outline 2022-01-13 14:46:15 -08:00