mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
16 lines
806 B
TypeScript
16 lines
806 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
'use strict';
|
|
import { ExtensionContext, languages } from 'vscode';
|
|
|
|
export function activate(context: ExtensionContext): any {
|
|
languages.setLanguageConfiguration('ruby', {
|
|
indentationRules: {
|
|
increaseIndentPattern: /^\s*((begin|class|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\sdo\b))\b[^\{;]*$/,
|
|
decreaseIndentPattern: /^\s*([}\]]([,)]?\s*(#|$)|\.[a-zA-Z_]\w*\b)|(end|rescue|ensure|else|elsif|when)\b)/
|
|
}
|
|
});
|
|
}
|