From 4daf7d3492ea3fb1753b9c697d0d924e0ec243a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Tue, 20 Dec 2022 22:04:57 +0100 Subject: [PATCH] Add lsp cursorInfo function --- src/lsp/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lsp/main.ts b/src/lsp/main.ts index eb472a904..56c499ecd 100644 --- a/src/lsp/main.ts +++ b/src/lsp/main.ts @@ -788,6 +788,17 @@ export async function getClojuredocs(symName: string, symNs: string): Promise { + const client: LanguageClient = getStateValue(LSP_CLIENT_KEY); + return client.sendRequest('clojure/cursorInfo/raw', { + textDocument: { uri: textDocument.uri.toString() }, + position: { line: position.line, character: position.character }, + }); +} + // TODO: This feels a bit brute, what are other ways to wait for the client to initialize? export function getClient(timeout: number): Promise { const start = Date.now();