From c19c252f343b77ab94ecf1a687a26a1e2cfd1d96 Mon Sep 17 00:00:00 2001 From: timdmackey Date: Tue, 7 Mar 2023 23:03:39 -0800 Subject: [PATCH] enhance auto-closing pairs and auto-surrounding pairs --- src/language-configuration.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/language-configuration.js b/src/language-configuration.js index 86a78b1..8a079fb 100644 --- a/src/language-configuration.js +++ b/src/language-configuration.js @@ -31,16 +31,27 @@ module.exports = { ], autoClosingPairs: [ ['{', '}'], - ['{{', '}}'], + ['{{ ', ' }}'], + ['{{-', '-}}'], + ['{{- ', ' -}}'], ['{%', '%}'], + ['{% ', ' %}'], + ['{%-', '-%}'], + ['{%- ', ' -%}'], ['[', ']'], ['(', ')'], ['"', '"'], ["'", "'"], ['<', '>'], + ['comment %} ', ' '], + ['comment -%} ', ' '], + ['comment%} ', ' '], + ['comment-%} ', ' '], ], autoCloseBefore: '%-:.,=}])>\'"` \n\t', surroundingPairs: [ + [' ', ' '], + ['%', '%'], ['-', '-'], ['<', '>'], ['{', '}'],