aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/analyzer_status.ts4
-rw-r--r--editors/code/src/commands/expand_macro.ts4
-rw-r--r--editors/code/src/commands/syntax_tree.ts4
3 files changed, 3 insertions, 9 deletions
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts
index cfe7d1af0..6631e8db7 100644
--- a/editors/code/src/commands/analyzer_status.ts
+++ b/editors/code/src/commands/analyzer_status.ts
@@ -37,12 +37,10 @@ export function analyzerStatus(ctx: Ctx): Cmd {
37 37
38class TextDocumentContentProvider 38class TextDocumentContentProvider
39 implements vscode.TextDocumentContentProvider { 39 implements vscode.TextDocumentContentProvider {
40 private ctx: Ctx;
41 uri = vscode.Uri.parse('rust-analyzer-status://status'); 40 uri = vscode.Uri.parse('rust-analyzer-status://status');
42 eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 41 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
43 42
44 constructor(ctx: Ctx) { 43 constructor(private readonly ctx: Ctx) {
45 this.ctx = ctx;
46 } 44 }
47 45
48 provideTextDocumentContent( 46 provideTextDocumentContent(
diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts
index dcdde78af..6fee6eb41 100644
--- a/editors/code/src/commands/expand_macro.ts
+++ b/editors/code/src/commands/expand_macro.ts
@@ -42,12 +42,10 @@ function code_format(expanded: ExpandedMacro): string {
42 42
43class TextDocumentContentProvider 43class TextDocumentContentProvider
44 implements vscode.TextDocumentContentProvider { 44 implements vscode.TextDocumentContentProvider {
45 private ctx: Ctx;
46 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs'); 45 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs');
47 eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 46 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
48 47
49 constructor(ctx: Ctx) { 48 constructor(private readonly ctx: Ctx) {
50 this.ctx = ctx;
51 } 49 }
52 50
53 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> { 51 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts
index 7dde66ad1..2887c96c8 100644
--- a/editors/code/src/commands/syntax_tree.ts
+++ b/editors/code/src/commands/syntax_tree.ts
@@ -68,12 +68,10 @@ interface SyntaxTreeParams {
68 68
69class TextDocumentContentProvider 69class TextDocumentContentProvider
70 implements vscode.TextDocumentContentProvider { 70 implements vscode.TextDocumentContentProvider {
71 private ctx: Ctx;
72 uri = vscode.Uri.parse('rust-analyzer://syntaxtree'); 71 uri = vscode.Uri.parse('rust-analyzer://syntaxtree');
73 eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 72 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
74 73
75 constructor(ctx: Ctx) { 74 constructor(private readonly ctx: Ctx) {
76 this.ctx = ctx;
77 } 75 }
78 76
79 provideTextDocumentContent(uri: vscode.Uri): vscode.ProviderResult<string> { 77 provideTextDocumentContent(uri: vscode.Uri): vscode.ProviderResult<string> {