From 72747c961a815e112000270ef273749a7f29ecd8 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 29 Oct 2023 22:48:03 +0100 Subject: [PATCH] Better completion style --- src/documentation/inlineHelp.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/documentation/inlineHelp.ts b/src/documentation/inlineHelp.ts index fe1a21b..0b182e6 100644 --- a/src/documentation/inlineHelp.ts +++ b/src/documentation/inlineHelp.ts @@ -982,7 +982,16 @@ export const toposCompletions = (context: CompletionContext) => { options: Object.keys(completionDatabase).map((key) => ({ label: key, type: completionDatabase[key].category, - info: `${completionDatabase[key].description}`, + info: () => { + let div = document.createElement('div'); + div.innerHTML = ` +

${completionDatabase[key].name} [${completionDatabase[key].category}]

+

${completionDatabase[key].description}

+
${completionDatabase[key].example}
+ ` + div.classList.add("px-4", "py-2", "rounded-lg", "w-92"); + return div + } })) } }