mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-28 08:48:48 +02:00
Автоотступ после Пока, Цикл, Если, Тогда, Попытка resolves #88
This commit is contained in:
parent
c5dff61860
commit
3dab1bdca7
@ -462,6 +462,9 @@ define([], function () {
|
||||
codeLenses: {
|
||||
provider: () => {},
|
||||
resolver: () => {}
|
||||
},
|
||||
indentationRules: {
|
||||
increaseIndentPattern: /^\s*(функция|function|процедура|procedure|если|if|пока|while|для|for|попытка|try|исключение|except).*$/i
|
||||
}
|
||||
},
|
||||
query: {
|
||||
@ -510,7 +513,8 @@ define([], function () {
|
||||
codeLenses: {
|
||||
provider: () => {},
|
||||
resolver: () => {}
|
||||
}
|
||||
},
|
||||
indentationRules: null
|
||||
},
|
||||
dcs: {
|
||||
languageDef: dcs_language,
|
||||
@ -556,7 +560,8 @@ define([], function () {
|
||||
codeLenses: {
|
||||
provider: () => {},
|
||||
resolver: () => {}
|
||||
}
|
||||
},
|
||||
indentationRules: null
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -1024,6 +1024,9 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
resolveCodeLens: lang.codeLenses.resolver
|
||||
});
|
||||
|
||||
if (lang.indentationRules)
|
||||
monaco.languages.setLanguageConfiguration(language.id, {indentationRules: lang.indentationRules});
|
||||
|
||||
if (!editor) {
|
||||
|
||||
for (const [key, value] of Object.entries(language.themes)) {
|
||||
@ -1039,6 +1042,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
wordBasedSuggestions: false,
|
||||
scrollBeyondLastLine: false,
|
||||
insertSpaces: false,
|
||||
autoIndent: true,
|
||||
customOptions: true
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user