We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53671c3 commit 360de61Copy full SHA for 360de61
packages/amazonq/src/lsp/utils.ts
@@ -3,8 +3,14 @@
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
import * as vscode from 'vscode'
6
+import { CursorState } from '@aws/language-server-runtimes-types'
7
-export function getCursorState(selection: readonly vscode.Selection[]) {
8
+/**
9
+ * Convert from vscode selection type to the general CursorState expected by the AmazonQLSP.
10
+ * @param selection
11
+ * @returns
12
+ */
13
+export function getCursorState(selection: readonly vscode.Selection[]): CursorState[] {
14
return selection.map((s) => ({
15
range: {
16
start: {
0 commit comments