Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DiagnosticsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class DiagnosticsManager implements vscode.Disposable {

private diagnosticCollection: vscode.DiagnosticCollection =
vscode.languages.createDiagnosticCollection("swift");
private allDiagnostics: Map<string, vscode.Diagnostic[]> = new Map();
allDiagnostics: Map<string, vscode.Diagnostic[]> = new Map();
private disposed = false;

constructor(context: WorkspaceContext) {
Expand Down
7 changes: 5 additions & 2 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export type DiagnosticCollectionOptions =
| "keepSwiftc"
| "keepSourceKit"
| "keepAll";
export type DiagnosticStyle = "default" | "llvm" | "swift";

/** sourcekit-lsp configuration */
export interface LSPConfiguration {
Expand Down Expand Up @@ -367,8 +368,10 @@ const configuration = {
.get<DiagnosticCollectionOptions>("diagnosticsCollection", "keepSourceKit");
},
/** set the -diagnostic-style option when running `swift` tasks */
get diagnosticsStyle(): "default" | "llvm" | "swift" {
return vscode.workspace.getConfiguration("swift").get("diagnosticsStyle", "llvm");
get diagnosticsStyle(): DiagnosticStyle {
return vscode.workspace
.getConfiguration("swift")
.get<DiagnosticStyle>("diagnosticsStyle", "llvm");
},
/** where to show the build progress for the running task */
get showBuildStatus(): ShowBuildStatusOptions {
Expand Down
Loading