diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/commands.ts | 6 | ||||
-rw-r--r-- | editors/code/src/lsp_ext.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index b22cd450b..24c2e196d 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts | |||
@@ -421,12 +421,10 @@ export function gotoLocation(ctx: Ctx): Cmd { | |||
421 | 421 | ||
422 | export function openDocs(ctx: Ctx): Cmd { | 422 | export function openDocs(ctx: Ctx): Cmd { |
423 | return async () => { | 423 | return async () => { |
424 | console.log("running openDocs"); | ||
425 | 424 | ||
426 | const client = ctx.client; | 425 | const client = ctx.client; |
427 | const editor = vscode.window.activeTextEditor; | 426 | const editor = vscode.window.activeTextEditor; |
428 | if (!editor || !client) { | 427 | if (!editor || !client) { |
429 | console.log("not yet ready"); | ||
430 | return | 428 | return |
431 | }; | 429 | }; |
432 | 430 | ||
@@ -435,7 +433,9 @@ export function openDocs(ctx: Ctx): Cmd { | |||
435 | 433 | ||
436 | const doclink = await client.sendRequest(ra.openDocs, { position, textDocument }); | 434 | const doclink = await client.sendRequest(ra.openDocs, { position, textDocument }); |
437 | 435 | ||
438 | vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink.remote)); | 436 | if (doclink != null) { |
437 | vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink)); | ||
438 | } | ||
439 | }; | 439 | }; |
440 | 440 | ||
441 | } | 441 | } |
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts index 562804715..fc8e120b3 100644 --- a/editors/code/src/lsp_ext.ts +++ b/editors/code/src/lsp_ext.ts | |||
@@ -119,4 +119,4 @@ export interface CommandLinkGroup { | |||
119 | commands: CommandLink[]; | 119 | commands: CommandLink[]; |
120 | } | 120 | } |
121 | 121 | ||
122 | export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, String | void, void>('experimental/externalDocs'); | 122 | export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, string | void, void>('experimental/externalDocs'); |