Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/dotenv/syntaxes/dotenv.tmLanguage.json
4772 views
1
{
2
"information_for_contributors": [
3
"This file has been converted from https://github.com/dotenv-org/dotenv-vscode/blob/master/syntaxes/dotenv.tmLanguage.json",
4
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
"Once accepted there, we are happy to receive an update request."
6
],
7
"version": "https://github.com/dotenv-org/dotenv-vscode/commit/e7e41baa5b23e01c1ff0567a4e596c24860e7def",
8
"scopeName": "source.dotenv",
9
"patterns": [
10
{
11
"comment": "Full Line Comment",
12
"match": "^\\s?(#.*$)\\n",
13
"captures": {
14
"1": {
15
"patterns": [
16
{
17
"include": "#line-comment"
18
}
19
]
20
}
21
}
22
},
23
{
24
"comment": "ENV entry",
25
"match": "^\\s?(.*?)\\s?(\\=)(.*)$",
26
"captures": {
27
"1": {
28
"patterns": [
29
{
30
"include": "#key"
31
}
32
]
33
},
34
"2": {
35
"name": "keyword.operator.assignment.dotenv"
36
},
37
"3": {
38
"name": "property.value.dotenv",
39
"patterns": [
40
{
41
"include": "#line-comment"
42
},
43
{
44
"include": "#double-quoted-string"
45
},
46
{
47
"include": "#single-quoted-string"
48
},
49
{
50
"include": "#interpolation"
51
}
52
]
53
}
54
}
55
}
56
],
57
"repository": {
58
"variable": {
59
"comment": "env variable",
60
"match": "[a-zA-Z_]+[a-zA-Z0-9_]*"
61
},
62
"line-comment": {
63
"comment": "Comment",
64
"match": "#.*$",
65
"name": "comment.line.dotenv"
66
},
67
"interpolation": {
68
"comment": "Interpolation (variable substitution)",
69
"match": "(\\$\\{)(.*)(\\})",
70
"captures": {
71
"1": {
72
"name": "keyword.interpolation.begin.dotenv"
73
},
74
"2": {
75
"name": "variable.interpolation.dotenv"
76
},
77
"3": {
78
"name": "keyword.interpolation.end.dotenv"
79
}
80
}
81
},
82
"escape-characters": {
83
"comment": "Escape characters",
84
"match": "\\\\[nrtfb\"'\\\\]|\\\\u[0123456789ABCDEF]{4}",
85
"name": "constant.character.escape.dotenv"
86
},
87
"double-quoted-string": {
88
"comment": "Double Quoted String",
89
"match": "\"(.*)\"",
90
"name": "string.quoted.double.dotenv",
91
"captures": {
92
"1": {
93
"patterns": [
94
{
95
"include": "#interpolation"
96
},
97
{
98
"include": "#escape-characters"
99
}
100
]
101
}
102
}
103
},
104
"single-quoted-string": {
105
"comment": "Single Quoted String",
106
"match": "'(.*)'",
107
"name": "string.quoted.single.dotenv"
108
},
109
"key": {
110
"comment": "Key",
111
"match": "(export\\s)?(.*)",
112
"captures": {
113
"1": {
114
"name": "keyword.key.export.dotenv"
115
},
116
"2": {
117
"name": "variable.key.dotenv",
118
"patterns": [
119
{
120
"include": "#variable"
121
}
122
]
123
}
124
}
125
}
126
}
127
}
128