Move expand macro to the new context

This commit is contained in:
Aleksey Kladov 2019-12-30 19:30:30 +01:00
parent 68f47a5b10
commit 94be27fc44
5 changed files with 53 additions and 75 deletions

View file

@ -66,10 +66,9 @@ interface SyntaxTreeParams {
class TextDocumentContentProvider
implements vscode.TextDocumentContentProvider {
ctx: Ctx;
private ctx: Ctx;
uri = vscode.Uri.parse('rust-analyzer://syntaxtree');
eventEmitter = new vscode.EventEmitter<vscode.Uri>();
syntaxTree: string = 'Not available';
constructor(ctx: Ctx) {
this.ctx = ctx;
@ -86,8 +85,8 @@ class TextDocumentContentProvider
range = editor.selection.isEmpty
? undefined
: this.ctx.client.code2ProtocolConverter.asRange(
editor.selection,
);
editor.selection,
);
}
const request: SyntaxTreeParams = {