internal: rename children_modules to child_modules

This commit is contained in:
David Barsky 2025-04-09 12:03:32 -04:00
parent a05564370d
commit 99a2b676bc
11 changed files with 45 additions and 39 deletions

View file

@ -171,8 +171,8 @@
"category": "rust-analyzer"
},
{
"command": "rust-analyzer.childrenModules",
"title": "Locate children modules",
"command": "rust-analyzer.childModules",
"title": "Locate child modules",
"category": "rust-analyzer"
},
{
@ -3379,7 +3379,7 @@
"when": "inRustProject"
},
{
"command": "rust-analyzer.childrenModule",
"command": "rust-analyzer.childModules",
"when": "inRustProject"
},
{

View file

@ -266,7 +266,7 @@ export function parentModule(ctx: CtxInit): Cmd {
};
}
export function childrenModules(ctx: CtxInit): Cmd {
export function childModules(ctx: CtxInit): Cmd {
return async () => {
const editor = vscode.window.activeTextEditor;
if (!editor) return;
@ -274,7 +274,7 @@ export function childrenModules(ctx: CtxInit): Cmd {
const client = ctx.client;
const locations = await client.sendRequest(ra.childrenModules, {
const locations = await client.sendRequest(ra.childModules, {
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(editor.document),
position: client.code2ProtocolConverter.asPosition(editor.selection.active),
});

View file

@ -194,11 +194,11 @@ export const parentModule = new lc.RequestType<
lc.LocationLink[] | null,
void
>("experimental/parentModule");
export const childrenModules = new lc.RequestType<
export const childModules = new lc.RequestType<
lc.TextDocumentPositionParams,
lc.LocationLink[] | null,
void
>("experimental/childrenModule");
>("experimental/childModules");
export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>(
"experimental/runnables",
);

View file

@ -158,7 +158,7 @@ function createCommands(): Record<string, CommandFactory> {
matchingBrace: { enabled: commands.matchingBrace },
joinLines: { enabled: commands.joinLines },
parentModule: { enabled: commands.parentModule },
childrenModules: { enabled: commands.childrenModules },
childModules: { enabled: commands.childModules },
viewHir: { enabled: commands.viewHir },
viewMir: { enabled: commands.viewMir },
interpretFunction: { enabled: commands.interpretFunction },
@ -188,7 +188,9 @@ function createCommands(): Record<string, CommandFactory> {
openWalkthrough: { enabled: commands.openWalkthrough },
// Internal commands which are invoked by the server.
applyActionGroup: { enabled: commands.applyActionGroup },
applySnippetWorkspaceEdit: { enabled: commands.applySnippetWorkspaceEditCommand },
applySnippetWorkspaceEdit: {
enabled: commands.applySnippetWorkspaceEditCommand,
},
debugSingle: { enabled: commands.debugSingle },
gotoLocation: { enabled: commands.gotoLocation },
hoverRefCommandProxy: { enabled: commands.hoverRefCommandProxy },
@ -201,8 +203,12 @@ function createCommands(): Record<string, CommandFactory> {
revealDependency: { enabled: commands.revealDependency },
syntaxTreeReveal: { enabled: commands.syntaxTreeReveal },
syntaxTreeCopy: { enabled: commands.syntaxTreeCopy },
syntaxTreeHideWhitespace: { enabled: commands.syntaxTreeHideWhitespace },
syntaxTreeShowWhitespace: { enabled: commands.syntaxTreeShowWhitespace },
syntaxTreeHideWhitespace: {
enabled: commands.syntaxTreeHideWhitespace,
},
syntaxTreeShowWhitespace: {
enabled: commands.syntaxTreeShowWhitespace,
},
};
}