From bede650dd7b625adb26031a57d69a447e7563e72 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 9 Oct 2020 01:16:05 -0500 Subject: [PATCH] feat: use self-contained ViewContainer components --- lib/signature-help-manager.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/signature-help-manager.js b/lib/signature-help-manager.js index a4ba08c..97efc41 100644 --- a/lib/signature-help-manager.js +++ b/lib/signature-help-manager.js @@ -5,8 +5,6 @@ const { CompositeDisposable, Disposable, Range, Point, TextEditor } = require("atom") import { ProviderRegistry } from "atom-ide-base/commons-atom/ProviderRegistry" import { ViewContainer } from "atom-ide-base/commons-ui/float-pane/ViewContainer" -import { getDocumentationHtml } from "atom-ide-base/commons-ui/float-pane/HTMLView" -import { getSnippetHtml } from "atom-ide-base/commons-ui/float-pane/SnippetView" import type { MarkdownService } from "atom-ide-base" module.exports = class SignatureHelpManager { @@ -254,7 +252,6 @@ module.exports = class SignatureHelpManager { this.unmountDataTip() const grammar = editor.getGrammar().scopeName.toLowerCase() - const snippetHtml = await getSnippetHtml([signature.label], grammar, this.renderer) let doc = null if (parameter) { @@ -268,15 +265,16 @@ module.exports = class SignatureHelpManager { } else { doc = "" } - const documentationHtml = await getDocumentationHtml([doc], grammar, this.renderer) const signatureHelpView = new ViewContainer({ snippet: { - element: snippetHtml, + snippet: signature.label, + grammar: grammar, containerClassName: "signature-container", contentClassName: "signature-snippet", }, - html: { - element: documentationHtml, + markdown: { + markdown: doc, + grammar: grammar, containerClassName: "signature-marked-container", contentClassName: "signature-marked", },