Merge branch 'master' into joh/outline

This commit is contained in:
Johannes Rieken
2018-05-15 18:12:33 +02:00
91 changed files with 1429 additions and 575 deletions

View File

@@ -263,7 +263,7 @@ export default class LanguageProvider {
}
public diagnosticsReceived(diagnosticsKind: DiagnosticKind, file: Uri, diagnostics: (Diagnostic & { reportUnnecessary: any })[]): void {
const config = workspace.getConfiguration(this.id);
const config = workspace.getConfiguration(this.id, file);
const reportUnnecessary = config.get<boolean>('showUnused.enabled', true);
if (diagnosticsKind === DiagnosticKind.Suggestion) {
this.ununsedHighlighter.diagnosticsReceived(file, diagnostics.filter(diag => diag.reportUnnecessary));