aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorZac Pullar-Strecker <[email protected]>2020-09-01 09:26:10 +0100
committerZac Pullar-Strecker <[email protected]>2020-10-08 03:04:20 +0100
commit974518fde7975b839ed4ccd4c5ce1d48cd6db3c7 (patch)
treecf25ef47c5531ca9934842a963afaabe78fc525f /editors
parenta14194b428efdb09cc45f9862ec34bef0038cd35 (diff)
Code reorganisation and field support
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/commands.ts6
-rw-r--r--editors/code/src/lsp_ext.ts2
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
422export function openDocs(ctx: Ctx): Cmd { 422export 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
122export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, String | void, void>('experimental/externalDocs'); 122export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, string | void, void>('experimental/externalDocs');