Edit

Share via


LanguageConfiguration interface

The language configuration interface defines the contract between extensions and various editor features, like automatic bracket insertion, automatic indentation etc.

Properties

autoClosingPairs

The language's auto closing pairs. The 'close' character is automatically inserted with the 'open' character is typed. If not set, the configured brackets will be used.

brackets

The language's brackets. This configuration implicitly affects pressing Enter around these brackets.

comments

The language's comment settings.

folding

The language's folding rules.

indentationRules

The language's indentation settings.

onEnterRules

The language's rules to be evaluated when pressing Enter.

surroundingPairs

The language's surrounding pairs. When the 'open' character is typed on a selection, the selected string is surrounded by the open and close characters. If not set, the autoclosing pairs settings will be used.

wordPattern

The language's word definition. If the language supports Unicode identifiers (e.g. JavaScript), it is preferable to provide a word definition that uses exclusion of known separators. e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number): /(-?\d*.\d\w*)|([^`~!@#%^&*()-=+[{]}\|;:'",.<>/?\s]+)/g

Property Details

autoClosingPairs

The language's auto closing pairs. The 'close' character is automatically inserted with the 'open' character is typed. If not set, the configured brackets will be used.

autoClosingPairs?: IAutoClosingPairConditional[]

Property Value

brackets

The language's brackets. This configuration implicitly affects pressing Enter around these brackets.

brackets?: CharacterPair[]

Property Value

comments

The language's comment settings.

comments?: CommentRule

Property Value

folding

The language's folding rules.

folding?: FoldingRules

Property Value

indentationRules

The language's indentation settings.

indentationRules?: IndentationRule

Property Value

onEnterRules

The language's rules to be evaluated when pressing Enter.

onEnterRules?: OnEnterRule[]

Property Value

surroundingPairs

The language's surrounding pairs. When the 'open' character is typed on a selection, the selected string is surrounded by the open and close characters. If not set, the autoclosing pairs settings will be used.

surroundingPairs?: IAutoClosingPair[]

Property Value

wordPattern

The language's word definition. If the language supports Unicode identifiers (e.g. JavaScript), it is preferable to provide a word definition that uses exclusion of known separators. e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number): /(-?\d*.\d\w*)|([^`~!@#%^&*()-=+[{]}\|;:'",.<>/?\s]+)/g

wordPattern?: RegExp

Property Value

RegExp