mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-23 11:54:25 +00:00
Move expand macro to the new context
This commit is contained in:
parent
68f47a5b10
commit
94be27fc44
5 changed files with 53 additions and 75 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue