Skip to content

Commit f0bd7b8

Browse files
authored
Merge pull request #256 from fredrik-bakke/autocomplete-literate
Add language configurations for individual literate file types
2 parents 70eea9c + d7bba7a commit f0bd7b8

File tree

8 files changed

+532
-2
lines changed

8 files changed

+532
-2
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Sourced from https://github.com/Trebor-Huang/vscode-forester/blob/main/resources/language/language-configuration.json
2+
{
3+
"comments": {
4+
"lineComment": "%"
5+
},
6+
"brackets": [
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"],
10+
["#{", "}"],
11+
["##{", "}"]
12+
],
13+
// "autoClosingPairs": [
14+
// {
15+
// "open": "{",
16+
// "close": "}"
17+
// },
18+
// {
19+
// "open": "[",
20+
// "close": "]"
21+
// },
22+
// {
23+
// "open": "(",
24+
// "close": ")"
25+
// },
26+
// {
27+
// "open": "\\{",
28+
// "close": "\\}"
29+
// },
30+
// {
31+
// "open": "\\<",
32+
// "close": ">"
33+
// }
34+
// ],
35+
"surroundingPairs": [
36+
["{", "}"],
37+
["[", "]"],
38+
["(", ")"]
39+
],
40+
"folding": {
41+
"markers": {
42+
"start": "{",
43+
"end": "}"
44+
}
45+
},
46+
// "wordPattern": "\\\\(@*[a-zA-Z]*)|[^\\s\\d`~!@#$%^&*()\\-=_+[\\]{}\\\\\\|;:'\"<>,./?\\u0500-\\uffff]+"
47+
48+
// Agda specific
49+
"autoClosingPairs": [
50+
{
51+
"open": "\"",
52+
"close": "\"",
53+
"notIn": ["comment", "string"]
54+
},
55+
{
56+
"open": "{!",
57+
"close": "!}",
58+
"notIn": ["comment", "string"]
59+
},
60+
{
61+
"open": "{-#",
62+
"close": "#-}",
63+
"notIn": ["comment", "string"]
64+
},
65+
{
66+
"open": "",
67+
"close": "",
68+
"notIn": ["comment", "string"]
69+
},
70+
{
71+
"open": "",
72+
"close": "",
73+
"notIn": ["comment", "string"]
74+
}
75+
],
76+
"wordPattern": "(?!\\\\)[^\\s\\n\\.\\;\\{\\}\\(\\)\\@\\\"]+"
77+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Sourced from https://github.com/microsoft/vscode/blob/main/extensions/markdown-basics/language-configuration.json
2+
{
3+
"comments": {
4+
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
5+
"blockComment": ["<!--", "-->"]
6+
},
7+
// symbols used as brackets
8+
"brackets": [
9+
["{", "}"],
10+
["[", "]"],
11+
["(", ")"]
12+
],
13+
"colorizedBracketPairs": [],
14+
// "autoClosingPairs": [
15+
// {
16+
// "open": "{",
17+
// "close": "}"
18+
// },
19+
// {
20+
// "open": "[",
21+
// "close": "]"
22+
// },
23+
// {
24+
// "open": "(",
25+
// "close": ")"
26+
// },
27+
// {
28+
// "open": "<",
29+
// "close": ">",
30+
// "notIn": ["string"]
31+
// }
32+
// ],
33+
"surroundingPairs": [
34+
["(", ")"],
35+
["[", "]"],
36+
["`", "`"],
37+
["_", "_"],
38+
["*", "*"],
39+
["{", "}"],
40+
["'", "'"],
41+
["\"", "\""],
42+
["<", ">"],
43+
["~", "~"],
44+
["$", "$"]
45+
],
46+
"folding": {
47+
"offSide": true,
48+
"markers": {
49+
"start": "^\\s*<!--\\s*#?region\\b.*-->",
50+
"end": "^\\s*<!--\\s*#?endregion\\b.*-->"
51+
}
52+
},
53+
// "wordPattern": {
54+
// "pattern": "(\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark})(((\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark})|[_])?(\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark}))*",
55+
// "flags": "ug"
56+
// }
57+
58+
// Agda specific
59+
"autoClosingPairs": [
60+
{
61+
"open": "\"",
62+
"close": "\"",
63+
"notIn": ["comment", "string"]
64+
},
65+
{
66+
"open": "{!",
67+
"close": "!}",
68+
"notIn": ["comment", "string"]
69+
},
70+
{
71+
"open": "{-#",
72+
"close": "#-}",
73+
"notIn": ["comment", "string"]
74+
},
75+
{
76+
"open": "",
77+
"close": "",
78+
"notIn": ["comment", "string"]
79+
},
80+
{
81+
"open": "",
82+
"close": "",
83+
"notIn": ["comment", "string"]
84+
}
85+
],
86+
"wordPattern": "(?!\\\\)[^\\s\\n\\.\\;\\{\\}\\(\\)\\@\\\"]+"
87+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Sourced from https://github.com/vscode-org-mode/vscode-org-mode/blob/develop/org.configuration.json
2+
{
3+
"comments": {
4+
"lineComment": "#",
5+
"blockComment": ["#+BEGIN_COMMENT\n", "\n#+END_COMMENT"]
6+
},
7+
"brackets": [
8+
["{", "}"],
9+
["[", "]"],
10+
["(", ")"]
11+
],
12+
// "autoClosingPairs": [
13+
// ["{", "}"],
14+
// ["[", "]"],
15+
// ["(", ")"],
16+
// ["\"", "\""]
17+
// ],
18+
"surroundingPairs": [
19+
["{", "}"],
20+
["[", "]"],
21+
["(", ")"],
22+
["\"", "\""],
23+
["'", "'"],
24+
["*", "*"],
25+
["/", "/"],
26+
["_", "_"],
27+
["=", "="],
28+
["~", "~"]
29+
],
30+
31+
// Agda specific
32+
"autoClosingPairs": [
33+
{
34+
"open": "\"",
35+
"close": "\"",
36+
"notIn": ["comment", "string"]
37+
},
38+
{
39+
"open": "{!",
40+
"close": "!}",
41+
"notIn": ["comment", "string"]
42+
},
43+
{
44+
"open": "{-#",
45+
"close": "#-}",
46+
"notIn": ["comment", "string"]
47+
},
48+
{
49+
"open": "",
50+
"close": "",
51+
"notIn": ["comment", "string"]
52+
},
53+
{
54+
"open": "",
55+
"close": "",
56+
"notIn": ["comment", "string"]
57+
}
58+
],
59+
"wordPattern": "(?!\\\\)[^\\s\\n\\.\\;\\{\\}\\(\\)\\@\\\"]+"
60+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Sourced from https://github.com/trond-snekvik/vscode-rst/blob/main/rst-configuration.json
2+
{
3+
"comments": {
4+
"lineComment": ".."
5+
},
6+
"brackets": [
7+
["(", ")"],
8+
["<", ">"],
9+
["[", "]"]
10+
],
11+
"surroundingPairs": [
12+
["(", ")"],
13+
["<", ">"],
14+
["`", "`"],
15+
["*", "*"],
16+
["|", "|"],
17+
["[", "]"]
18+
],
19+
// "autoClosingPairs": [
20+
// { "open": "(", "close": ")" },
21+
// { "open": "<", "close": ">" },
22+
// { "open": "'", "close": "'"},
23+
// { "open": "`", "close": "`", "notIn": ["string"]},
24+
// { "open": "\"", "close": "\""},
25+
// { "open": "[", "close": "]"}
26+
// ],
27+
// "autoCloseBefore": ":})>`\\n ",
28+
"onEnterRules": [
29+
{
30+
"beforeText": "^\\s*\\.\\. *$|(?<!:)::(\\s|$)",
31+
"action": { "indent": "indent" }
32+
}
33+
],
34+
// "wordPattern": "[\\w-]*\\w[\\w-]*"
35+
36+
// Agda specific
37+
"autoClosingPairs": [
38+
{
39+
"open": "\"",
40+
"close": "\"",
41+
"notIn": ["comment", "string"]
42+
},
43+
{
44+
"open": "{!",
45+
"close": "!}",
46+
"notIn": ["comment", "string"]
47+
},
48+
{
49+
"open": "{-#",
50+
"close": "#-}",
51+
"notIn": ["comment", "string"]
52+
},
53+
{
54+
"open": "",
55+
"close": "",
56+
"notIn": ["comment", "string"]
57+
},
58+
{
59+
"open": "",
60+
"close": "",
61+
"notIn": ["comment", "string"]
62+
}
63+
],
64+
"wordPattern": "(?!\\\\)[^\\s\\n\\.\\;\\{\\}\\(\\)\\@\\\"]+"
65+
}

0 commit comments

Comments
 (0)