mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-20 02:20:21 +00:00
Handle proc macro fetching via OpQueue
This commit is contained in:
parent
27c076a367
commit
ee02213e65
17 changed files with 121 additions and 92 deletions
|
@ -200,8 +200,8 @@
|
|||
"category": "rust-analyzer"
|
||||
},
|
||||
{
|
||||
"command": "rust-analyzer.reloadProcMacros",
|
||||
"title": "Reload proc macros and build scripts",
|
||||
"command": "rust-analyzer.rebuildProcMacros",
|
||||
"title": "Rebuild proc macros and build scripts",
|
||||
"category": "rust-analyzer"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -749,8 +749,8 @@ export function reloadWorkspace(ctx: CtxInit): Cmd {
|
|||
return async () => ctx.client.sendRequest(ra.reloadWorkspace);
|
||||
}
|
||||
|
||||
export function reloadProcMacros(ctx: CtxInit): Cmd {
|
||||
return async () => ctx.client.sendRequest(ra.reloadProcMacros);
|
||||
export function rebuildProcMacros(ctx: CtxInit): Cmd {
|
||||
return async () => ctx.client.sendRequest(ra.rebuildProcMacros);
|
||||
}
|
||||
|
||||
export function addProject(ctx: CtxInit): Cmd {
|
||||
|
|
|
@ -383,7 +383,7 @@ export class Ctx {
|
|||
"\n\n[Reload Workspace](command:rust-analyzer.reloadWorkspace)"
|
||||
);
|
||||
statusBar.tooltip.appendMarkdown(
|
||||
"\n\n[Rebuild Proc Macros](command:rust-analyzer.reloadProcMacros)"
|
||||
"\n\n[Rebuild Proc Macros](command:rust-analyzer.rebuildProcMacros)"
|
||||
);
|
||||
statusBar.tooltip.appendMarkdown("\n\n[Restart server](command:rust-analyzer.startServer)");
|
||||
statusBar.tooltip.appendMarkdown("\n\n[Stop server](command:rust-analyzer.stopServer)");
|
||||
|
|
|
@ -43,7 +43,7 @@ export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, Te
|
|||
"rust-analyzer/relatedTests"
|
||||
);
|
||||
export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace");
|
||||
export const reloadProcMacros = new lc.RequestType0<null, void>("rust-analyzer/reloadProcMacros");
|
||||
export const rebuildProcMacros = new lc.RequestType0<null, void>("rust-analyzer/reloadProcMacros");
|
||||
|
||||
export const runFlycheck = new lc.NotificationType<{
|
||||
textDocument: lc.TextDocumentIdentifier | null;
|
||||
|
|
|
@ -153,7 +153,7 @@ function createCommands(): Record<string, CommandFactory> {
|
|||
memoryUsage: { enabled: commands.memoryUsage },
|
||||
shuffleCrateGraph: { enabled: commands.shuffleCrateGraph },
|
||||
reloadWorkspace: { enabled: commands.reloadWorkspace },
|
||||
reloadProcMacros: { enabled: commands.reloadProcMacros },
|
||||
rebuildProcMacros: { enabled: commands.rebuildProcMacros },
|
||||
addProject: { enabled: commands.addProject },
|
||||
matchingBrace: { enabled: commands.matchingBrace },
|
||||
joinLines: { enabled: commands.joinLines },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue