Browse Source

Add folding configuration

Alex Dima 7 years ago
parent
commit
98b335974d
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/tsMode.ts

+ 8 - 3
src/tsMode.ts

@@ -121,7 +121,12 @@ const richEditConfiguration:monaco.languages.LanguageConfiguration = {
 		{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
 		{ open: '`', close: '`', notIn: ['string', 'comment'] },
 		{ open: "/**", close: " */", notIn: ["string"] }
-	]
-};
-
+	],
 
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*//\\s*#?region\\b"),
+			end: new RegExp("^\\s*//\\s*#?endregion\\b")
+		}
+	}
+};