mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 12:47:14 +00:00
17 lines
897 B
TypeScript
17 lines
897 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)/
|
|
},
|
|
wordPattern: /(-?\d+(?:\.\d+))|(:?[A-Za-z][^-`~@#%^&()=+[{}|;:'",<>/.*\]\s\\!?]*[!?]?)/
|
|
});
|
|
}
|