Skip to content

Commit

Permalink
Slight tweak to presentation of hover docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehoban committed Aug 16, 2016
1 parent 5de65a3 commit 23f3e74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/goDeclaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export function definitionLocation(document: vscode.TextDocument, position: vsco
break;
}
}

if (doc != '') {
definitionInformation.doc = doc;
}
Expand Down
6 changes: 3 additions & 3 deletions src/goExtraInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

'use strict';

import { HoverProvider, Hover, TextDocument, Position, CancellationToken } from 'vscode';
import { HoverProvider, Hover, MarkedString, TextDocument, Position, CancellationToken } from 'vscode';
import { definitionLocation } from './goDeclaration';

export class GoHoverProvider implements HoverProvider {
Expand All @@ -28,9 +28,9 @@ export class GoHoverProvider implements HoverProvider {
} else {
text = lines[0];
}
let hoverTexts = [];
let hoverTexts: MarkedString[] = [];
if (definitionInfo.doc != null) {
hoverTexts.push({ language: null, value: definitionInfo.doc});
hoverTexts.push(definitionInfo.doc);
}
hoverTexts.push({ language: 'go', value: text});
let hover = new Hover(hoverTexts);
Expand Down

0 comments on commit 23f3e74

Please sign in to comment.