-
I'm running the demo with remote authority and remote path and an extension that provides language config and language server, I see the output of the language server in the outputs tab but I wonder if I can make my own requests? I was able to do this with const lc = wrapper.getLanguageClientWrapper();
const res = await lc
?.getLanguageClient()
?.sendRequest('textDocument/documentSymbol', {
textDocument: { uri: 'file:///workspace/resources.tf' },
});
console.log(res); Can I access registered langugage clients? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The language client runs in the extension code, so there's no way to access it, except if the extension explicitly export it to other extensions running in the same extension host |
Beta Was this translation helpful? Give feedback.
-
But instead of running the LSP request directly, you can probably do it via the VSCode api: const symbols = await vscode.commands.executeCommand(
'vscode.executeDocumentSymbolProvider',
vscode.Uri.parse('file:///workspace/resources.tf')
) as vscode.DocumentSymbol[]; |
Beta Was this translation helpful? Give feedback.
But instead of running the LSP request directly, you can probably do it via the VSCode api: