Skip to content

Commit b9e284f

Browse files
authored
Fix auto-closing quotes for heredocs (#101)
* Fix auto-closing quotes for heredocs Add triple double quotes (`"""`) as an auto-closing pair in the Elixir language configuration to prevent extra quotes from being inserted when starting a heredoc string. * add auto-closing pairs for sigils - add auto-closing pairs for triple double quotes with sigils - since adding those auto closing pairs breaks single double quote pairs, add pairs for single double quotes with sigils as well - the sigil list is from elixir-editors/emacs-elixir#454
1 parent 6e8d1ef commit b9e284f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

elixir-language-configuration.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,39 @@
1717
"autoClosingPairs": [
1818
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
1919
{ "open": "\"", "close": "\"", "notIn": ["comment"] },
20+
{ "open": "~B\"", "close": "\"" },
21+
{ "open": "~C\"", "close": "\"" },
22+
{ "open": "~D\"", "close": "\"" },
23+
{ "open": "~E\"", "close": "\"" },
24+
{ "open": "~L\"", "close": "\"" },
25+
{ "open": "~N\"", "close": "\"" },
26+
{ "open": "~R\"", "close": "\"" },
27+
{ "open": "~S\"", "close": "\"" },
28+
{ "open": "~T\"", "close": "\"" },
29+
{ "open": "~U\"", "close": "\"" },
30+
{ "open": "~b\"", "close": "\"" },
31+
{ "open": "~c\"", "close": "\"" },
32+
{ "open": "~e\"", "close": "\"" },
33+
{ "open": "~r\"", "close": "\"" },
34+
{ "open": "~s\"", "close": "\"" },
35+
{ "open": "~w\"", "close": "\"" },
36+
{ "open": "\"\"\"", "close": "\"\"\"" },
37+
{ "open": "~B\"\"\"", "close": "\"\"\"" },
38+
{ "open": "~C\"\"\"", "close": "\"\"\"" },
39+
{ "open": "~D\"\"\"", "close": "\"\"\"" },
40+
{ "open": "~E\"\"\"", "close": "\"\"\"" },
41+
{ "open": "~L\"\"\"", "close": "\"\"\"" },
42+
{ "open": "~N\"\"\"", "close": "\"\"\"" },
43+
{ "open": "~R\"\"\"", "close": "\"\"\"" },
44+
{ "open": "~S\"\"\"", "close": "\"\"\"" },
45+
{ "open": "~T\"\"\"", "close": "\"\"\"" },
46+
{ "open": "~U\"\"\"", "close": "\"\"\"" },
47+
{ "open": "~b\"\"\"", "close": "\"\"\"" },
48+
{ "open": "~c\"\"\"", "close": "\"\"\"" },
49+
{ "open": "~e\"\"\"", "close": "\"\"\"" },
50+
{ "open": "~r\"\"\"", "close": "\"\"\"" },
51+
{ "open": "~s\"\"\"", "close": "\"\"\"" },
52+
{ "open": "~w\"\"\"", "close": "\"\"\"" },
2053
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
2154
{ "open": "(", "close": ")" },
2255
{ "open": "{", "close": "}" },

0 commit comments

Comments
 (0)