Format snippers

This commit is contained in:
Adria Navarro 2025-02-11 15:46:09 +01:00
parent 11dd47a9d2
commit 5d12cc3b7e
1 changed files with 3 additions and 10 deletions

View File

@ -137,17 +137,9 @@ export const snippetAutoComplete = (snippets: Snippet[]): BindingCompletion => {
return {
from: word.from,
options: snippets.map(snippet => ({
section: buildSectionHeader("snippets", "Snippets", "Code", 100),
label: `snippets.${snippet.name}`,
type: "text",
simple: true,
apply: (
view: EditorView,
completion: BindingCompletionOption,
from: number,
to: number
) => {
insertSnippet(view, from, to, completion.label)
},
displayLabel: snippet.name,
})),
}
}
@ -239,6 +231,7 @@ export const jsHelperAutocomplete = (
if (!word || (word.from == word.to && !context.explicit)) {
return null
}
return {
from: word.from,
options: baseCompletions.map(helper => ({