mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Refactor applySourceChange
This commit is contained in:
parent
83d2527880
commit
5aebf1081d
7 changed files with 68 additions and 89 deletions
|
@ -40,11 +40,10 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
|||
class TextDocumentContentProvider
|
||||
implements vscode.TextDocumentContentProvider {
|
||||
|
||||
ctx: Ctx
|
||||
uri = vscode.Uri.parse('rust-analyzer-status://status');
|
||||
eventEmitter = new vscode.EventEmitter<vscode.Uri>();
|
||||
|
||||
ctx: Ctx
|
||||
|
||||
constructor(ctx: Ctx) {
|
||||
this.ctx = ctx
|
||||
}
|
||||
|
@ -53,9 +52,8 @@ class TextDocumentContentProvider
|
|||
_uri: vscode.Uri,
|
||||
): vscode.ProviderResult<string> {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor == null) {
|
||||
return '';
|
||||
}
|
||||
if (editor == null) return '';
|
||||
|
||||
return this.ctx.client.sendRequest<string>(
|
||||
'rust-analyzer/analyzerStatus',
|
||||
null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue