diff options
Diffstat (limited to 'code/src')
-rw-r--r-- | code/src/extension.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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 | } |