mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Code: enable prettier trailing commas
This commit is contained in:
parent
897b550049
commit
273299693b
31 changed files with 233 additions and 232 deletions
|
@ -9,7 +9,7 @@ export class TextDocumentContentProvider
|
|||
public syntaxTree: string = 'Not available';
|
||||
|
||||
public provideTextDocumentContent(
|
||||
uri: vscode.Uri
|
||||
uri: vscode.Uri,
|
||||
): vscode.ProviderResult<string> {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor == null) {
|
||||
|
@ -17,7 +17,7 @@ export class TextDocumentContentProvider
|
|||
}
|
||||
return Server.client.sendRequest<string>(
|
||||
'rust-analyzer/analyzerStatus',
|
||||
null
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,8 @@ export function makeCommand(context: vscode.ExtensionContext) {
|
|||
context.subscriptions.push(
|
||||
vscode.workspace.registerTextDocumentContentProvider(
|
||||
'rust-analyzer-status',
|
||||
textDocumentContentProvider
|
||||
)
|
||||
textDocumentContentProvider,
|
||||
),
|
||||
);
|
||||
|
||||
context.subscriptions.push({
|
||||
|
@ -44,21 +44,21 @@ export function makeCommand(context: vscode.ExtensionContext) {
|
|||
if (poller != null) {
|
||||
clearInterval(poller);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return async function handle() {
|
||||
if (poller == null) {
|
||||
poller = setInterval(
|
||||
() => textDocumentContentProvider.eventEmitter.fire(statusUri),
|
||||
1000
|
||||
1000,
|
||||
);
|
||||
}
|
||||
const document = await vscode.workspace.openTextDocument(statusUri);
|
||||
return vscode.window.showTextDocument(
|
||||
document,
|
||||
vscode.ViewColumn.Two,
|
||||
true
|
||||
true,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue