diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json
index 2782d12525e..c3ee021e795 100644
--- a/extensions/ruby/package.json
+++ b/extensions/ruby/package.json
@@ -1,8 +1,10 @@
{
"name": "ruby",
- "version": "0.1.0",
+ "version": "0.2.0",
"publisher": "vscode",
"engines": { "vscode": "*" },
+ "activationEvents": ["onLanguage:ruby"],
+ "main": "./out/rubyMain",
"contributes": {
"languages": [{
"id": "ruby",
@@ -17,5 +19,9 @@
"scopeName": "source.ruby",
"path": "./syntaxes/Ruby.plist"
}]
+ },
+ "scripts": {
+ "compile": "gulp compile-extension:ruby",
+ "watch": "gulp watch-extension:ruby"
}
}
diff --git a/extensions/ruby/src/rubyMain.ts b/extensions/ruby/src/rubyMain.ts
new file mode 100644
index 00000000000..2151fe80f52
--- /dev/null
+++ b/extensions/ruby/src/rubyMain.ts
@@ -0,0 +1,16 @@
+/*---------------------------------------------------------------------------------------------
+ * 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\\!?]*[!?]?)/
+ });
+}
diff --git a/extensions/ruby/src/typings/ref.d.ts b/extensions/ruby/src/typings/ref.d.ts
new file mode 100644
index 00000000000..7f4835e6747
--- /dev/null
+++ b/extensions/ruby/src/typings/ref.d.ts
@@ -0,0 +1,10 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+///
+///
+///
+///
+///
\ No newline at end of file
diff --git a/extensions/ruby/tsconfig.json b/extensions/ruby/tsconfig.json
new file mode 100644
index 00000000000..a20cb4ee941
--- /dev/null
+++ b/extensions/ruby/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es5",
+ "outDir": "./out",
+ "noLib": true,
+ "sourceMap": true
+ },
+ "exclude": [
+ "node_modules"
+ ]
+}
\ No newline at end of file