mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix incorrect committed rust and run prettier
This commit is contained in:
parent
cfa15d49aa
commit
de5e3cf745
4 changed files with 37 additions and 36 deletions
|
@ -1132,27 +1132,24 @@ export function linkToCommand(_: Ctx): Cmd {
|
|||
|
||||
export function viewMemoryLayout(ctx: CtxInit): Cmd {
|
||||
return async () => {
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (!editor) return "";
|
||||
const client = ctx.client;
|
||||
|
||||
const position = editor.selection.active;
|
||||
const expanded = await client.sendRequest(ra.viewRecursiveMemoryLayout, {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
editor.document
|
||||
),
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(editor.document),
|
||||
position,
|
||||
});
|
||||
|
||||
// if (expanded == null) return "Not available";
|
||||
|
||||
|
||||
const document = vscode.window.createWebviewPanel(
|
||||
"memory_layout",
|
||||
"[Memory Layout]",
|
||||
vscode.ViewColumn.Two,
|
||||
{ enableScripts: true, });
|
||||
{ enableScripts: true }
|
||||
);
|
||||
|
||||
document.webview.html = `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
@ -1407,7 +1404,7 @@ locate()
|
|||
|
||||
})()
|
||||
</script>
|
||||
</html>`
|
||||
</html>`;
|
||||
|
||||
ctx.pushExtCleanup(document);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue