Skip to content
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

minor: let diagnostics.enable's scope be limited to DiagnosticsCode::Ra only #17146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alibektas
Copy link
Member

@alibektas alibektas commented Apr 26, 2024

The documentation for the config rust-analyzer.diagnostics.enable states : "Whether to show native rust-analyzer diagnostics". However as I further investigated #17048 I came to the conclusion that the thing it currently does is to disable/enable diagnostics completely. I am not sure if that's the desired behavior. If so, this PR should better be closed.
If not this PR changes the said config to regulate whether we should show diagnostics with diagnostics code DiagnosticCode::Ra or not and thereby fixes #17048.

As to the new test : It only serves the purpose of demonstrating what the change means. As soon as it becomes clear that this PR has any sense I will write a test under ide_diagnostics

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2024
@alibektas alibektas changed the title Let diagnostics.enable's scope be limited to DiagnosticsCode::Ra only minor: let diagnostics.enable's scope be limited to DiagnosticsCode::Ra only Apr 26, 2024
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in question here seems correct to me, in that these parts configure the native diagnostics only (opposed to flycheck ones). Us mapping some of r-a's diagnostics to rustc error codes is irrelevant to the setting in my eyes. I'd say the point of the setting is to just not get real time diagnostics which is what it currently configures.

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Fill struct fields" assist has stopped showing up in many cases
3 participants