about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
diff options
context:
space:
mode:
authorDavid Barsky <me@davidbarsky.com>2025-04-09 12:03:32 -0400
committerDavid Barsky <me@davidbarsky.com>2025-04-09 12:43:49 -0400
commitd85f89599ae6fb2b6d15d52a3005c85234f4f030 (patch)
tree6ae08d1a8b13cc956015a6df7d19d517226b9472 /src/tools/rust-analyzer/editors/code
parent7d7ad655d9874141211909f165795f1b737f02d7 (diff)
internal: rename `children_modules` to `child_modules`
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
-rw-r--r--src/tools/rust-analyzer/editors/code/package.json6
-rw-r--r--src/tools/rust-analyzer/editors/code/src/commands.ts4
-rw-r--r--src/tools/rust-analyzer/editors/code/src/lsp_ext.ts4
-rw-r--r--src/tools/rust-analyzer/editors/code/src/main.ts14
4 files changed, 17 insertions, 11 deletions
diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json
index daabab49ece..ae05992321a 100644
--- a/src/tools/rust-analyzer/editors/code/package.json
+++ b/src/tools/rust-analyzer/editors/code/package.json
@@ -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"
                 },
                 {
diff --git a/src/tools/rust-analyzer/editors/code/src/commands.ts b/src/tools/rust-analyzer/editors/code/src/commands.ts
index a78e935152c..3ac1a933d9e 100644
--- a/src/tools/rust-analyzer/editors/code/src/commands.ts
+++ b/src/tools/rust-analyzer/editors/code/src/commands.ts
@@ -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),
         });
diff --git a/src/tools/rust-analyzer/editors/code/src/lsp_ext.ts b/src/tools/rust-analyzer/editors/code/src/lsp_ext.ts
index 1cf55f6613a..20952e93ccc 100644
--- a/src/tools/rust-analyzer/editors/code/src/lsp_ext.ts
+++ b/src/tools/rust-analyzer/editors/code/src/lsp_ext.ts
@@ -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",
 );
diff --git a/src/tools/rust-analyzer/editors/code/src/main.ts b/src/tools/rust-analyzer/editors/code/src/main.ts
index 95a52d710cc..5e500730693 100644
--- a/src/tools/rust-analyzer/editors/code/src/main.ts
+++ b/src/tools/rust-analyzer/editors/code/src/main.ts
@@ -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,
+        },
     };
 }