-
Notifications
You must be signed in to change notification settings - Fork 255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good approach to me. I'm currently changing the config management stuff, so don't worry about making config public.
Could you squash the commits please? And rebase, rather than merging. Thanks!
diagnostics: diagnostics.iter().map(|&(ref d, _)| d.clone()).collect(), | ||
diagnostics: diagnostics.iter() | ||
.map(|&(ref d, _)| d.clone()) | ||
.filter(|d| show_warnings || d.severity != Some(DiagnosticSeverity::Warning)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use filter_map here rather than map and filter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess like so?
diagnostics: diagnostics.iter()
.filter_map(|&(ref d, _)| {
let d = d.clone();
if show_warnings || d.severity != Some(DiagnosticSeverity::Warning) {
Some(d)
} else {
None
}
})
Not sure if you had something more succinct in mind.
Implemented show_warnings
First time I've squashed and rebased something. Please tell me if I did it right. |
Yep, looks good to me! |
I've merged and applied the |
Cool. What should I work on next? |
I think the extension I mentioned would be a good next thing to work on. It is very related to this, but you'll need to learn a little bit about the VFS (in the rls-vfs crate, you'll want to use I think this should be under a different config option (always_show_diagnostics, or something similar) and should apply to errors as well as warnings.
|
BTW, I just pushed my changes to the config system so that configuration is handled by the client now |
Awesome. I'll work on the extension then. |
@robbym how's it going on the extension to this? Do you have any questions about anything? |
Issue #252
show_warnings
to configconvert_build_results_to_notifications
BuildQueue
publicFirst, am I filtering in the right place? This works, but I'm not sure if there is a better place to put the filter. Also, adding
pub
toBuildQueue
feels dirty. Should config be some sort of shared object or accessed via method call?