Commit Graph
2597 Commits
Author SHA1 Message Date
Antonio Scandurra 06faec5348 📝 Improve assertion comment 2022-01-29 10:41:55 +01:00
Antonio Scandurra b5da038bea Always return valid locations when refreshing anchors
Specifically, with this commit:

- We will now refresh the anchor if it escapes the boundaries of the excerpt by
using the `Excerpt::contains` method. This was not the case before, as we were
just checking if the excerpt id and buffer id of the anchors matched the ones
stored on the excerpt.
- We fixed a bug that was causing the anchor to be outside of the excerpt when
resetting it to one of the excerpt's endpoints after we couldn't keep its
position. This would happen because we were using `anchor_at`, which resolved
the anchor to an offset first and then converted it back into an anchor with
the given bias, which is a lossy operation. We now use `Anchor::bias` to
achieve the same goal: note that this could still lead to the anchor escaping
the excerpt's boundary when the bias doesn't match the endpoint's bias, so we
take extra care to avoid that and `min`/`max` the newly-produced anchor with
the other endpoint.
2022-01-29 10:10:53 +01:00
Antonio Scandurra 009e45df15 Prevent anchors from escaping their excerpt's range when resolving them
This could happen if an anchor was created on an excerpt with a larger range.
Then, if the excerpt was removed and added back at the same position and with
the same buffer but a smaller range, resolving the anchor could overshoot
the excerpt's boundaries.
2022-01-29 09:52:38 +01:00
Max Brunsfeld dfa55cbf1b Merge pull request #376 from zed-industries/bump-rust-analyzer
Bump rust-analyzer to the 2022-01-24 release
2022-01-28 13:24:24 -07:00
Max Brunsfeld e5a75adb41 Adjust hover assertion in lsp test after bumping rust-analyzer 2022-01-28 12:11:26 -08:00
Antonio Scandurra cbdb9107cd Bump rust-analyzer to the 2022-01-24 release 2022-01-28 19:46:14 +01:00
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 Scandurra 3bc01b54b5 Merge pull request #374 from zed-industries/fix-editor-panic
Fix editor panic when ending transaction that wasn't started by the same editor
2022-01-27 16:36:49 +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 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 ScandurraandNathan Sobo 9cd3e5eeac Fix warning
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 15:55:48 +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
Antonio Scandurra 34f4346530 Style empty project diagnostics state 2022-01-27 10:21:26 +01:00
Antonio Scandurra 1b21fae7fc Merge pull request #373 from zed-industries/empty-diagnostic-message
Filter out supporting diagnostics that contain no messages
2022-01-27 10:12:13 +01:00
Antonio Scandurra 603ddcb7f1 Filter out supporting diagnostics that contain no messages 2022-01-27 09:51:15 +01:00
Antonio Scandurra 888f3f3a02 Merge pull request #371 from zed-industries/metal-debug
Add script to debug Metal frames
2022-01-27 08:56:05 +01:00
Antonio Scandurra f1bac331b0 Add script to debug Metal frames 2022-01-27 08:51:55 +01:00
Max Brunsfeld 2630e28454 Use latest rust docker image 2022-01-26 12:54:51 -08:00
Max BrunsfeldandNathan Sobo 505289aceb Use new feature resolver
This fixes a build failure on linux because gpui was being spuriously
included as a dependency of zed-server, due to its presence as an
optional dependency in the rpc crate.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 12:51:29 -08:00
Max BrunsfeldandNathan Sobo 4b081bd128 Use Rust 2021 edition in all crates
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 12:50:31 -08:00
Max Brunsfeld 53779b46ff Avoid stripping newlines before opening backticks in error messages 2022-01-26 11:51:12 -08:00
Max Brunsfeld 9f2d80c4fd Dial back opacity of border.1 in dark themes 2022-01-26 11:27:00 -08: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 ScandurraandMax Brunsfeld 3506c564d9 Alpha-blend borders with backgrounds in quad SDF
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-26 19:16:26 +01:00
Antonio ScandurraandNathan Sobo c93762e78c Bump the protocol version
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 17:42:04 +01:00
Nathan SoboandAntonio Scandurra 42adc2cd15 Add retries to rescan test that uses the real file system
We could potentially use a fake file system, but this should avoid flaky tests in the short run.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-26 09:25:06 -07:00
Nathan Sobo 5e66481518 Merge pull request #366 from zed-industries/style-project-diagnostics
Style project diagnostics
2022-01-26 09:18:20 -07:00
Antonio ScandurraandNathan Sobo d673418d74 Style diagnostic header's border in light and dark theme
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 17:08:24 +01:00
Antonio ScandurraandNathan Sobo 506b462d53 Fix blending of quad's border with background
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 17:06:20 +01:00
Antonio ScandurraandNathan Sobo a92c3af8b1 Position underlines at a distance proportional to the line descent
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 16:03:06 +01: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
Antonio Scandurra 1c65140dea WIP: Start on squiggly underlines 2022-01-26 13:07:39 +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 Brunsfeld 2313283b26 Render diagnostic status bar icon with icons 2022-01-25 15:33:34 -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 74c35a4a14 Sanitize language server diagnostics coming from Rust
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-25 17:49:50 +01: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
Max Brunsfeld b1ce02b1fd Merge pull request #363 from zed-industries/remote-go-to-definition
Make go-to-definition work for guests
2022-01-24 17:25:57 -08:00
Max BrunsfeldandNathan Sobo 82bcd0528e Add random delays in FakeFs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-24 16:50:38 -08:00