diff --git a/lib/signature-help-manager.js b/lib/signature-help-manager.js index 951e1fe..dcec455 100644 --- a/lib/signature-help-manager.js +++ b/lib/signature-help-manager.js @@ -236,21 +236,20 @@ module.exports = class SignatureHelpManager { markedString.push(markdownDoc); } - const activeParam = signature.parameters ? signature.parameters[result.activeParameter || 0].label : undefined; + const activeParam = signature.parameters ? signature.parameters[result.activeParameter || 0] : undefined; const s = markedString.join('\r\n'); - const requestToken = `${position.row}:${position.column}`; - this.renderer.render(requestToken, s).then(({ token, html }) => { + this.renderer.render(s).then((html) => { if (editor.getLastCursor().getBufferRow() == position.row) { // make sure we are still on the same position if (activeParam) { - this.highlightParameter(html, activeParam); + this.highlightParameter(html, activeParam.label); } this.unmountDataTip(); const signatureHelpView = new SignatureHelpView({ htmlView: html }); this.signatureHelpDisposables = this.mountSignatureHelp(editor, position, signatureHelpView); } - }).catch(({ token, error }) => { - console.error(token, error); + }).catch((err) => { + console.error(err); }); }); } diff --git a/styles/atom-ide-signature-help-marked.less b/styles/atom-ide-signature-help-marked.less index 585a2a9..2f0520e 100644 --- a/styles/atom-ide-signature-help-marked.less +++ b/styles/atom-ide-signature-help-marked.less @@ -9,8 +9,8 @@ color: @syntax-text-color; font-family: var(--editor-font-family); font-size: var(--editor-font-size); - max-width: 800px; - max-height: 400px; + max-height: 24em; + max-width: 64em; overflow: auto; white-space: normal; diff --git a/styles/atom-ide-signature-help.less b/styles/atom-ide-signature-help.less index 32962b7..74d00b4 100644 --- a/styles/atom-ide-signature-help.less +++ b/styles/atom-ide-signature-help.less @@ -10,8 +10,8 @@ position: relative; white-space: normal; pointer-events: all; - max-width: 800px; - max-height: 400px; + max-height: 24em; + max-width: 64em; overflow: none; p { @@ -23,7 +23,7 @@ } .signature-overlay { - z-index: 12 !important; // HACK: exceed the z-index of + z-index: 4 !important; // HACK: exceed the z-index of // .atom-dock-resize-handle-resizable, so that // mouseleaves aren't triggered when the cursor enters // the resizable @@ -33,8 +33,8 @@ background-color: @syntax-background-color; display: flex; position: relative; - max-width: 800px; - max-height: 400px; + max-height: 24em; + max-width: 64em; transition: background-color 0.15s ease; padding: 8px; white-space: pre-wrap;