mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Refactors calls to languages.setLanguageConfiguration to declarative descriptions in language-configuration.json. This fixes #98621.
This commit is contained in:
@@ -92,26 +92,6 @@ export function startClient(context: ExtensionContext, newLanguageClient: Langua
|
||||
// client can be deactivated on extension deactivation
|
||||
context.subscriptions.push(disposable);
|
||||
|
||||
let indentationRules = {
|
||||
increaseIndentPattern: /(^.*\{[^}]*$)/,
|
||||
decreaseIndentPattern: /^\s*\}/
|
||||
};
|
||||
|
||||
languages.setLanguageConfiguration('css', {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g,
|
||||
indentationRules: indentationRules
|
||||
});
|
||||
|
||||
languages.setLanguageConfiguration('less', {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]+(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g,
|
||||
indentationRules: indentationRules
|
||||
});
|
||||
|
||||
languages.setLanguageConfiguration('scss', {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@$#.!])?[\w-?]+%?|[@#!$.])/g,
|
||||
indentationRules: indentationRules
|
||||
});
|
||||
|
||||
client.onReady().then(() => {
|
||||
context.subscriptions.push(initCompletionProvider());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user