zesterer / ariadne

A fancy diagnostics & error reporting crate
https://crates.io/crates/ariadne
MIT License
1.61k stars 72 forks source link

Feature Request: Suggest an edit for note/help #56

Open Scoder12 opened 1 year ago

Scoder12 commented 1 year ago

Would be useful to be able to suggest edits in a note/help message similar to how rust does it.

Need to be able to provide a new version of the line/file, not sure how that would work.

zesterer commented 1 year ago

I'll have to think about how to implement this carefully, but I agree that it's definitely desirable!

oppiliappan commented 1 year ago

i love the idea of doing this (i'd imagine a lot of effort might go behind the implementation of this). i just wanted to second this as i have a use case for this in statix to supply "fix" suggestions. currently, the suggestion is just supplied as part of the message as Try ... instead: Screenshot_20230108_025831

zesterer commented 1 year ago

Yes, I do a similar thing in Tao. It works for the most part, but it would be nice to have an inline hint.

image

I've been meaning to give this crate the time it needs for a full refactor, but I've yet to find the time (life keeps throwing curveballs at me). I'd definitely want this feature to be part of that.