aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/.vscode/launch.json4
-rw-r--r--code/src/extension.ts10
2 files changed, 12 insertions, 2 deletions
diff --git a/code/.vscode/launch.json b/code/.vscode/launch.json
index 64f2c3693..5e615ad4c 100644
--- a/code/.vscode/launch.json
+++ b/code/.vscode/launch.json
@@ -9,10 +9,10 @@
9 "type": "extensionHost", 9 "type": "extensionHost",
10 "request": "launch", 10 "request": "launch",
11 "runtimeExecutable": "${execPath}", 11 "runtimeExecutable": "${execPath}",
12 "args": ["--extensionDevelopmentPath=${workspaceRoot}"], 12 "args": ["--extensionDevelopmentPath='./'"],
13 "stopOnEntry": false, 13 "stopOnEntry": false,
14 "sourceMaps": true, 14 "sourceMaps": true,
15 "outFiles": [ "${workspaceRoot}/out/src/**/*.js" ], 15 "outFiles": [ "./out/src/**/*.js" ],
16 "preLaunchTask": "npm" 16 "preLaunchTask": "npm"
17 }, 17 },
18 ] 18 ]
diff --git a/code/src/extension.ts b/code/src/extension.ts
index afcbccf63..95305db2d 100644
--- a/code/src/extension.ts
+++ b/code/src/extension.ts
@@ -111,6 +111,16 @@ function startServer() {
111 ) 111 )
112 } 112 }
113 ) 113 )
114 client.onRequest(
115 new lc.RequestType<lc.Position, void, any, any>("m/moveCursor"),
116 (params: lc.Position, token: lc.CancellationToken) => {
117 let editor = vscode.window.activeTextEditor;
118 if (editor == null) return
119 if (!editor.selection.isEmpty) return
120 let position = client.protocol2CodeConverter.asPosition(params)
121 editor.selection = new vscode.Selection(position, position);
122 }
123 )
114 }) 124 })
115 client.start(); 125 client.start();
116} 126}