rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.31k stars 1.62k forks source link

Function error underlining #18502

Closed oiyl closed 1 week ago

oiyl commented 1 week ago

When there is an error in a function (such as a mismatched type when the function isn't finished yet, or mismatched curly braces, etc.), the Rust Analyzer plugin underlines the entire function, which can be very distracting. I was wondering if there is a way to fix this. Many thanks to the maintainers and contributors of this extremely useful extension.

Image

ChayimFriedman2 commented 1 week ago

I think this error is from rustc, not rust-analyzer, so I don't believe we can fix that.

oiyl commented 1 week ago

I think this error is from rustc, not rust-analyzer, so I don't believe we can fix that.

oh, in that case that's my bad, thanks regardless. to anybody else who may stumble upon this, an acceptable workaround for me i just experimented with is

"workbench.colorCustomizations":{
    "editorError.foreground": "#00000000",
    "editorWarning.foreground": "#00000000"
    "editorInfo.foreground": "#00000000",
}

in settings.json

+Error Lens plugin

Image