Prechádzať zdrojové kódy

Add HTML rich language config

Marco Petersen 5 rokov pred
rodič
commit
8c432bf06e
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      src/twig/twig.ts

+ 4 - 0
src/twig/twig.ts

@@ -5,6 +5,8 @@
 
 'use strict';
 
+import { conf as htmlConf, language as htmlLanguage } from '../html/html';
+
 import IRichLanguageConfiguration = monaco.languages.LanguageConfiguration;
 import ILanguage = monaco.languages.IMonarchLanguage;
 
@@ -21,6 +23,7 @@ export const conf: IRichLanguageConfiguration = {
 		['{{', '}}'],
 		['(', ')'],
 		['[', ']'],
+		...htmlConf.brackets,
 	],
 
 	autoClosingPairs: [
@@ -36,6 +39,7 @@ export const conf: IRichLanguageConfiguration = {
 	surroundingPairs: [
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
+		...htmlConf.surroundingPairs,
 	],
 }