Skip to content

Commit

Permalink
Minor updates to hover and symbol providers.
Browse files Browse the repository at this point in the history
  • Loading branch information
PranayAgarwal committed Oct 19, 2016
1 parent 02067d7 commit 4f4681b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export class HackHoverProvider implements vscode.HoverProvider {

return hh_client.typeAtPos(document.fileName, line, character).then(value => {
if (value) {
if (value.startsWith('(function')) {
value = value.slice(1, value.length - 1);
}
const formattedMessage: vscode.MarkedString = { language: 'hack', value: value };
return new vscode.Hover(formattedMessage);
}
Expand All @@ -28,7 +31,8 @@ const symbolArray = [
{ key: 'class', value: vscode.SymbolKind.Class },
{ key: 'abstract class', value: vscode.SymbolKind.Class },
{ key: 'static method', value: vscode.SymbolKind.Method },
{ key: 'constant', value: vscode.SymbolKind.Constant }
{ key: 'constant', value: vscode.SymbolKind.Constant },
{ key: 'interface', value: vscode.SymbolKind.Interface }
];

const symbolMap = new Map(
Expand Down

0 comments on commit 4f4681b

Please sign in to comment.