about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorZac Pullar-Strecker <zacmps@gmail.com>2020-09-01 20:26:10 +1200
committerZac Pullar-Strecker <zacmps@gmail.com>2020-10-08 15:04:20 +1300
commit974518fde7975b839ed4ccd4c5ce1d48cd6db3c7 (patch)
treecf25ef47c5531ca9934842a963afaabe78fc525f /editors/code/src
parenta14194b428efdb09cc45f9862ec34bef0038cd35 (diff)
downloadrust-974518fde7975b839ed4ccd4c5ce1d48cd6db3c7.tar.gz
rust-974518fde7975b839ed4ccd4c5ce1d48cd6db3c7.zip
Code reorganisation and field support
Diffstat (limited to 'editors/code/src')
-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 b22cd450b07..24c2e196dbf 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -421,12 +421,10 @@ export function gotoLocation(ctx: Ctx): Cmd {
 
 export function openDocs(ctx: Ctx): Cmd {
     return async () => {
-        console.log("running openDocs");
 
         const client = ctx.client;
         const editor = vscode.window.activeTextEditor;
         if (!editor || !client) {
-            console.log("not yet ready");
             return
         };
 
@@ -435,7 +433,9 @@ export function openDocs(ctx: Ctx): Cmd {
 
         const doclink = await client.sendRequest(ra.openDocs, { position, textDocument });
 
-        vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink.remote));
+        if (doclink != null) {
+            vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink));
+        }
     };
 
 }
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 56280471509..fc8e120b3fc 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -119,4 +119,4 @@ export interface CommandLinkGroup {
     commands: CommandLink[];
 }
 
-export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, String | void, void>('experimental/externalDocs');
+export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, string | void, void>('experimental/externalDocs');