console.warn(`[${languageIdentifier.language}]: language configuration: expected \`onEnterRules[${i}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);
console.warn(`[${languageIdentifier.language}]: language configuration: expected \`onEnterRules[${i}].action.appendText\` to be undefined or a string.`);
console.warn(`[${languageIdentifier.language}]: language configuration: expected \`onEnterRules[${i}].action.removeText\` to be undefined or a number.`);
description:nls.localize('schema.onEnterRules','The language\'s rules to be evaluated when pressing Enter.'),
required:['beforeText','action'],
properties:{
beforeText:{
type:['string','object'],
description:nls.localize('schema.onEnterRules.beforeText','This rule will only execute if the text before the cursor matches this regular expression.'),
properties:{
pattern:{
type:'string',
description:nls.localize('schema.onEnterRules.beforeText.pattern','The RegExp pattern for beforeText.'),
default:'',
},
flags:{
type:'string',
description:nls.localize('schema.onEnterRules.beforeText.flags','The RegExp flags for beforeText.'),
default:'',
pattern:'^([gimuy]+)$',
patternErrorMessage:nls.localize('schema.onEnterRules.beforeText.errorMessage','Must match the pattern `/^([gimuy]+)$/`.')
}
}
},
afterText:{
type:['string','object'],
description:nls.localize('schema.onEnterRules.afterText','This rule will only execute if the text after the cursor matches this regular expression.'),
properties:{
pattern:{
type:'string',
description:nls.localize('schema.onEnterRules.afterText.pattern','The RegExp pattern for afterText.'),
default:'',
},
flags:{
type:'string',
description:nls.localize('schema.onEnterRules.afterText.flags','The RegExp flags for afterText.'),
default:'',
pattern:'^([gimuy]+)$',
patternErrorMessage:nls.localize('schema.onEnterRules.afterText.errorMessage','Must match the pattern `/^([gimuy]+)$/`.')
}
}
},
oneLineAboveText:{
type:['string','object'],
description:nls.localize('schema.onEnterRules.oneLineAboveText','This rule will only execute if the text above the line matches this regular expression.'),
properties:{
pattern:{
type:'string',
description:nls.localize('schema.onEnterRules.oneLineAboveText.pattern','The RegExp pattern for oneLineAboveText.'),
default:'',
},
flags:{
type:'string',
description:nls.localize('schema.onEnterRules.oneLineAboveText.flags','The RegExp flags for oneLineAboveText.'),
default:'',
pattern:'^([gimuy]+)$',
patternErrorMessage:nls.localize('schema.onEnterRules.oneLineAboveText.errorMessage','Must match the pattern `/^([gimuy]+)$/`.')
}
}
},
action:{
type:['string','object'],
description:nls.localize('schema.onEnterRules.action','The action to execute.'),
required:['indent'],
default:{'indent':'indent'},
properties:{
indent:{
type:'string',
description:nls.localize('schema.onEnterRules.action.indent',"Describe what to do with the indentation"),
default:'indent',
enum:['none','indent','indentOutdent','outdent'],
markdownEnumDescriptions:[
nls.localize('schema.onEnterRules.action.indent.none',"Insert new line and copy the previous line's indentation."),
nls.localize('schema.onEnterRules.action.indent.indent',"Insert new line and indent once (relative to the previous line's indentation)."),
nls.localize('schema.onEnterRules.action.indent.indentOutdent',"Insert two new lines:\n - the first one indented which will hold the cursor\n - the second one at the same indentation level"),
nls.localize('schema.onEnterRules.action.indent.outdent',"Insert new line and outdent once (relative to the previous line's indentation).")
]
},
appendText:{
type:'string',
description:nls.localize('schema.onEnterRules.action.appendText','Describes text to be appended after the new line and after the indentation.'),
default:'',
},
removeText:{
type:'number',
description:nls.localize('schema.onEnterRules.action.removeText','Describes the number of characters to remove from the new line\'s indentation.'),