LanguageConfiguration interface

语言配置接口定义了扩展和各种编辑器功能之间的契约,例如自动插入括号、自动缩进等。

属性

autoClosingPairs

该语言的自动关闭对。 “close”字符与键入“open”字符一起自动插入。 如果未设置,将使用配置的括号。

brackets

语言的括号。 此配置隐式影响按这些括号周围的 Enter 键。

comments

语言的注释设置。

folding

语言的折叠规则。

indentationRules

语言的缩进设置。

onEnterRules

按 Enter 键时要计算的语言规则。

surroundingPairs

语言的周围对。 在选择上键入“打开”字符时,所选字符串将被打开和关闭字符括起来。 如果未设置,将使用自动关闭对设置。

wordPattern

语言的单词定义。 如果该语言支持 Unicode 标识符(例如 JavaScript),则最好提供使用排除已知分隔符的单词定义。 例如:匹配除已知分隔符以外的任何内容的正则表达式(并且允许点出现在浮点数中):/(-?\d*.\d\w*)|([^'~!@#%^&*()-=+[{]}\|;:'“,.<>/?\s]+)/g

属性详细信息

autoClosingPairs

该语言的自动关闭对。 “close”字符与键入“open”字符一起自动插入。 如果未设置,将使用配置的括号。

autoClosingPairs?: IAutoClosingPairConditional[]

属性值

brackets

语言的括号。 此配置隐式影响按这些括号周围的 Enter 键。

brackets?: CharacterPair[]

属性值

comments

语言的注释设置。

comments?: CommentRule

属性值

folding

语言的折叠规则。

folding?: FoldingRules

属性值

indentationRules

语言的缩进设置。

indentationRules?: IndentationRule

属性值

onEnterRules

按 Enter 键时要计算的语言规则。

onEnterRules?: OnEnterRule[]

属性值

surroundingPairs

语言的周围对。 在选择上键入“打开”字符时,所选字符串将被打开和关闭字符括起来。 如果未设置,将使用自动关闭对设置。

surroundingPairs?: IAutoClosingPair[]

属性值

wordPattern

语言的单词定义。 如果该语言支持 Unicode 标识符(例如 JavaScript),则最好提供使用排除已知分隔符的单词定义。 例如:匹配除已知分隔符以外的任何内容的正则表达式(并且允许点出现在浮点数中):/(-?\d*.\d\w*)|([^'~!@#%^&*()-=+[{]}\|;:'“,.<>/?\s]+)/g

wordPattern?: RegExp

属性值

RegExp