-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-line diagnostics #1927
Comments
Wd do support this with the hover. I'll add support for the |
With regards to error-lists, showing long error messages completely would occupy space. So, I am thinking to provide an expand/collapse option for the error-entry to show or hide the complete description. |
Also, a mono-space font should be used. Otherwise whitespace based formatting won't work |
cc @stevencl for how to handle multiline diagnostics in the error list view |
Supporting multiline or long descriptions is not trivial with current infrastructure. Firstly, I will be showing them with ellipsis. @joaomoreno mentioned different ideas on how we can support this in trees.. Will look into them. |
Marking this as a feature request for problems view to show multi line descriptions |
I'm not sure if this belongs in its own issue or is suitable to piggy back on the discussion here: Some languages (Rust, for instance) output additional references to lines of code that contributed to the error. Adding these to the Problems window would be helpful to the end user, but doing so causes confusion because the diagnostic entries are sorted on the Allowing a |
@trixnz Scenario you mentioned is different than what is being discussed here. Its about showing long/ multi line description problems. Trees, I mentioned here is an implementation detail. But, we do show problems as tree with only one level. Your scenario is interesting and I would suggest to make that as a separate issue, since, it needs changes at multiple places for eg: Diagnostic model, api etc |
any progress on this? It's been a long while. As it currently stands, Flow for VS Code is basically useless because of issues like this: If you can't see usages for typed modules for something so common as unused props, you've basically just typed a file for no purpose other than its own use. |
Multiline errors are not yet planned, we will definitely come to this when there are free cycles. Thanks. |
Is it possible to bump this in priority? Off the top of my head, Elm, Reason/Bucklescript, Typescript would greatly benefit from this. Rust was mentioned above. In general, most modern languages/build tools provide multiline errors which become unreadable when squashed into single line. Hovering to display the error is nice-ish, but it breaks the mostly-keyboard flow that developers are in when developing. |
I second @dmitriid's comment. I'm building a proof assistant, and lack of multiline errors makes the diagnostics view essentially useless for my purposes—but with a modification to support multiline errors (or at the very least, a modification so that diagnostics are displayed in the order that they are reported!) it would become an essential part of my users' workflow. As it stands, I may have to implement my own diagnostics pane, which I was hoping to avoid. |
(See #16099 for a description of the out-of-order diagnostics issue I mention in connection with this.) |
…pans The message is a bit useless at the moment but LSP does not have a good way to do multi-span and it might be best to leave this mildly useless message until they do so instead of special-casing it to not appear. Related: microsoft/vscode#1927
For those who are curious, I fixed this by following these (somewhat hacky) steps:
.panel .monaco-tree-row {
white-space: pre-line;
height: auto !important;
}
For day-to-day development this has greatly increased my productivity but its unfortunate that it requires an ouside plugin to achieve. |
@damassi You are the hero we don't deserve :) |
@damassi The hack might break other behaviour like Scrolling if there are many problems. |
@sandy081 - Indeed it does break scrolling but for most of my cases its been more than sufficient. I'll look into opening a PR for a proper fix today 👍 |
Dart is considering more verbose messages to help users too, so I'd love to see this. I did wonder about using the additional info and just setting the same range (since it already expands/collapses), but it shows the filename/range even if it's the same: Maybe hiding the filename/range info if it's the same as the parent diagnostic would be a relatively simple way to get part-way there (the diagnostic provider would have to split the lines, of course). |
Note that my vs-code-custom CSS solution to this no longer works in the latest VSCode, haven't had time to investigate why, but 👍 👍 for getting multiline in core! |
Beautiful @sandy081 💯 🎉 |
Some error messages (e.g. from Elm) are quite verbose, and are very hard to read properly without line breaks.
Therefore it would be nice if the
vscode.Diagnostic
message could contain line breaks (these could be stripped out in theErrors and warnings
selector to keep the UI sensible). It would be even nicer still if error messages could contain colors and styles.This is an example of the kind of thing it would be nice to have in a diagnostic popup:
The text was updated successfully, but these errors were encountered: