共用方式為


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