Skip to content

Commit 360de61

Browse files
committed
docs: add comment clarifying util is lsp specific
1 parent 53671c3 commit 360de61

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/amazonq/src/lsp/utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import * as vscode from 'vscode'
6+
import { CursorState } from '@aws/language-server-runtimes-types'
67

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[] {
814
return selection.map((s) => ({
915
range: {
1016
start: {

0 commit comments

Comments
 (0)