-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add the ability to make multiline suggestions/notes #293
Comments
Yeah, this has been requested before (See #285)! Perhaps this is something we should have a look at. For this specific instance, I'm wondering if using the notes section would help. Eg.
But I realise there are other instances where this is not as helpful, say with lifetime diagnostics, where you have to step through a sequence of related locations. It would also be good to think about how this maps onto the language server protocol, but we might not want to limit ourselves by it. Eg. I tend to find lifetime errors easier to understand in the terminal, rather than using rust-analyzer. |
As with most pretty error stuff, the logic will be lost in the LSP, which is not necessarily bad, i agree with you in saying cli is way better for some errors, i dont think LSP should limit codespan when it comes to features. The example was the first i could think of, it is obviously very simplistic. |
I have not looked at the commits that were made, but maybe #176 could be interesting in this context? |
Allowing users to write their own render logic and plug into codespan's renderer would be infinitely helpful when it comes to more specific diagnostics |
Hello!
I have been working on a large project and a lot of the errors have suggestions attached to them, however, i would greatly appreciate being able to make suggestions like rustc_errors can do. Example:
Being able to make suggestions which point to some lines in the source code but change it and label the changes would be a great feature, however, thinking of a good API to provide this will not be an easy task. Another thing i have considered is potentially exposing the renderer API to allow users to tack on their own render logic, which would help me immensely.
The text was updated successfully, but these errors were encountered: