Skip to content

Commit c7a0bd3

Browse files
authored
Merge pull request #1015 from Durbatuluk1701/indentation_fixes
Change Language Config to Fix Indents
2 parents d5734a0 + 97e89ff commit c7a0bd3

4 files changed

+55
-82
lines changed

Diff for: client/coq.configuration.json

-80
This file was deleted.

Diff for: client/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"extensions": [
4848
".v"
4949
],
50-
"configuration": "./coq.configuration.json",
50+
"configuration": "./syntax/coq.language-configuration.json",
5151
"icon": {
5252
"light": "./assets/logo.png",
5353
"dark": "./assets/logo.png"
@@ -62,7 +62,7 @@
6262
"extensions": [
6363
"_CoqProject"
6464
],
65-
"configuration": "./coq-project.configuration.json",
65+
"configuration": "./syntax/coq-project.language-configuration.json",
6666
"icon": {
6767
"light": "./assets/logo.png",
6868
"dark": "./assets/logo.png"

Diff for: client/syntax/coq.language-configuration.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"comments": {
3+
"blockComment": ["(*", "*)"]
4+
},
5+
"brackets": [
6+
["{", "}"],
7+
["[", "]"],
8+
["{|", "|}"],
9+
["(", ")"]
10+
],
11+
"colorizedBracketPairs": [
12+
["{", "}"],
13+
["[", "]"],
14+
["(", ")"],
15+
["{|", "|}"]
16+
],
17+
"autoClosingPairs": [
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+
"open": "{|",
36+
"close": "|"
37+
}
38+
],
39+
// This allows for VSCode to suggest better intellisense hints (especially for definition names that include a "'" in them)
40+
"wordPattern": "(_|[a-zA-Z\\p{L}])([a-zA-Z\\p{L}\\d'_])*",
41+
"indentationRules": {
42+
/* Increase next lines indentation if:
43+
* We are a Section, Module Type, or Module opening
44+
* We are a Proof. command without Show before it
45+
*/
46+
"increaseIndentPattern": "((Section|Module\\s+Type|Module)\\s+(_|[a-zA-Z\\p{L}])([a-zA-Z\\p{L}\\d'_])*)|((((?<!Show\\s)Proof))\\.)",
47+
/* Decrease the current lines indentation if:
48+
* We are a Section, Module Type, or Module ending
49+
* <Whitespace>*<Keywords>.<Whitespace>*
50+
*/
51+
"decreaseIndentPattern": "^\\s*(End\\s+(_|[a-zA-Z\\p{L}])([a-zA-Z\\p{L}\\d'_])*)|(Qed|Admitted|Abort)\\.\\s*$"
52+
}
53+
}

0 commit comments

Comments
 (0)