Vscode: Add action to show inline all diagnostics in file.

Created on 2 Feb 2017  路  9Comments  路  Source: microsoft/vscode

F8 and Shift + F8 navigation between diagnostic is really nice but sometimes it would be useful to have nice view of all diagnostics in current file.

Looks like it would be fairly simple to implement, just one additional editor action in https://github.com/Microsoft/vscode/blob/2a40036dbb34aac4f5aefbe999c21f2eaf76c59b/src/vs/editor/contrib/gotoError/browser/gotoError.ts, I could try implementing it if this feature idea is accepted.

editor-contrib feature-request

Most helpful comment

Yes, I know about Problems view. But I think that having inlined errors can be useful anyway. :)

image

Changes in code are rather small so it's not adding any complexity etc, it's command so it's opt-in by users, it's providing same UI as existing diagnostics navigation, I don't see any drawbacks
https://github.com/Microsoft/vscode/compare/master...Krzysztof-Cieslak:inline-all-decorations

All 9 comments

@Krzysztof-Cieslak did you try the Problems view? It shows below the editor all problems.

/cc @sandy081 @alexandrudima

Yes, I know about Problems view. But I think that having inlined errors can be useful anyway. :)

image

Changes in code are rather small so it's not adding any complexity etc, it's command so it's opt-in by users, it's providing same UI as existing diagnostics navigation, I don't see any drawbacks
https://github.com/Microsoft/vscode/compare/master...Krzysztof-Cieslak:inline-all-decorations

This is pretty much ready, If there is decision that feature proposal is accepted, I'll make PR.

@jrieken FYI

I like but there some technical challenges because of some shortcomings of the current implementation. The problem is that the zone widget with the little arrow on top can only be shown when its target line is rendered. Therefore it always reveals that line to enforce rendering. That's not a problem with how we use it today because goto error reveals the error anyways. However, it's a different story when showing all errors, the last one will always be revealed...

In short, I'd happily review/guide a PR for this but it is a little bit of work...

There is an extension in the marketplace called ErrorLens which does this: https://marketplace.visualstudio.com/items?itemName=PhilHindle.errorlens

Might be useful until it's supported natively...

Forked ErrorLens and made a few tweaks:

  1. Update decorations for all visible editors (split/grid) instead of only active one
  2. Hot reload of settings
  3. Support of gutter icons
  4. Set priority of decorations right: Error => Warning => Info => Hint
  5. Some other features like (Excluding problems; Update only on save; Update with delay; Set colors for light theme, ...)

https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Was this page helpful?
0 / 5 - 0 ratings