-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
fix(lsp): regression where certain diagnostics were showing for disabled files #13530
fix(lsp): regression where certain diagnostics were showing for disabled files #13530
Conversation
.unwrap_or_default(); | ||
let diagnostics = generate_ts_diagnostics( | ||
snapshot.clone(), | ||
&config, |
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 had intended to flip diagnostics to not be calculated at all upfront if the config was disabled and then I completely forgot to do the second half of that 🤦♂️
.cloned() | ||
.partition::<Vec<_>, _>(|s| config.specifier_enabled(s)); | ||
let ts_diagnostics_map: TsDiagnosticsMap = if !enabled_specifiers.is_empty() { | ||
let req = tsc::RequestMethod::GetDiagnostics(enabled_specifiers); |
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 think only doing this for enabled specifiers should be a decent performance improvement in workspaces with a lot of disabled files.
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.
LGTM
Closes #13524