1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-24 08:33:29 +02:00

Заготовка под функцию, подготавливающую сниппет (запрос и вставка метаданных)

This commit is contained in:
salexdv 2022-01-28 07:36:48 +03:00
parent 07f0c2e207
commit 58df650ca9

View File

@ -509,6 +509,19 @@ class bslHelper {
}
/**
* Replace standart choice elements with metadata objects
*
* @param {string} snippet code of snippet
*
* @returns {string} formated code of snippet
*/
prepareSnippetCode(snippet) {
return snippet;
}
/**
* Determines if string contain class constructor (New|Новый)
*
@ -4716,7 +4729,7 @@ class bslHelper {
suggestions.push({
label: value.prefix,
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: value.body,
insertText: this.prepareSnippetCode(value.body),
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
detail: key,
documentation: { "value": this.prepareSnippetDocumentation(value.body) }