Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
272 lines (272 loc) · 7.88 KB
/
Copy pathpackage.json
File metadata and controls
272 lines (272 loc) · 7.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
{
"name": "tomlsmith",
"displayName": "TomlSmith",
"description": "TOML language support powered by the TomlSmith language server.",
"version": "0.4.0",
"publisher": "TomlSmith",
"author": "Nirvana-Jie <1357711537@qq.com>",
"license": "MIT",
"private": true,
"packageManager": "pnpm@11.22.0",
"repository": {
"type": "git",
"url": "https://github.com/tomlsmith/vscode-plugin.git"
},
"homepage": "https://github.com/tomlsmith/vscode-plugin#readme",
"bugs": {
"url": "https://github.com/tomlsmith/vscode-plugin/issues"
},
"engines": {
"vscode": "^1.95.0"
},
"main": "./dist/extension.js",
"icon": "images/icon.png",
"galleryBanner": {
"color": "#F4F7FB",
"theme": "light"
},
"extensionKind": [
"workspace"
],
"capabilities": {
"virtualWorkspaces": {
"supported": false,
"description": "TomlSmith needs to spawn the tomlsmith-lsp executable, which requires a real filesystem workspace."
},
"untrustedWorkspaces": {
"supported": "limited",
"restrictedConfigurations": [
"tomlsmith.server.path",
"tomlsmith.server.arguments",
"tomlsmith.server.environment"
],
"description": "Restricted Mode ignores workspace overrides of the server launch settings."
}
},
"categories": [
"Programming Languages",
"Formatters",
"Linters"
],
"keywords": [
"toml",
"formatter",
"language-server",
"lsp"
],
"contributes": {
"languages": [
{
"id": "toml",
"aliases": [
"TOML",
"toml"
],
"extensions": [
".toml"
],
"filenames": [
"Cargo.lock",
"Pipfile",
"uv.lock",
"poetry.lock",
"pdm.lock"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "toml",
"scopeName": "source.toml",
"path": "./syntaxes/toml.tmLanguage.json"
}
],
"semanticTokenTypes": [
{
"id": "tomlDateTime",
"description": "TOML date, time, and date-time values reported by the TomlSmith language server."
},
{
"id": "tomlInvalid",
"description": "Invalid or unrecognized TOML syntax reported by the TomlSmith language server."
}
],
"semanticTokenModifiers": [
{
"id": "tomlArray",
"description": "TOML keys whose values are arrays."
},
{
"id": "tomlInlineTable",
"description": "TOML keys whose values are inline tables."
},
{
"id": "tomlArrayTable",
"description": "TOML array-of-tables headers."
},
{
"id": "tomlInlineTableMember",
"description": "TOML key segments declared inside inline tables."
}
],
"semanticTokenScopes": [
{
"language": "toml",
"scopes": {
"property": [
"variable.other.property.toml"
],
"property.tomlArray": [
"variable.other.property.array.toml"
],
"property.tomlInlineTable": [
"variable.other.property.table.toml"
],
"property.tomlInlineTableMember": [
"variable.other.property.inline-table-member.toml"
],
"namespace": [
"entity.name.namespace.toml"
],
"namespace.tomlArrayTable": [
"entity.name.section.array.toml"
],
"tomlDateTime": [
"constant.other.datetime.toml"
],
"tomlInvalid": [
"invalid.illegal.toml"
]
}
}
],
"configurationDefaults": {
"[toml]": {
"editor.semanticTokenColorCustomizations": {
"[Dark+][Default Dark+]": {
"rules": {
"property.tomlInlineTableMember:toml": "#4FC1FF"
}
}
},
"editor.tokenColorCustomizations": {
"[Dark+][Default Dark+]": {
"textMateRules": [
{
"scope": "variable.other.property.inline-table-member.toml",
"settings": {
"foreground": "#4FC1FF"
}
}
]
}
}
}
},
"commands": [
{
"command": "tomlsmith.restartServer",
"title": "TomlSmith: Restart Language Server"
}
],
"configuration": {
"title": "TomlSmith",
"properties": {
"tomlsmith.server.path": {
"type": "string",
"default": "tomlsmith-lsp",
"scope": "machine-overridable",
"description": "Path or command name for tomlsmith-lsp. When not set explicitly, the extension prefers a server binary bundled with the extension and otherwise resolves tomlsmith-lsp from PATH. Changing this setting automatically restarts the language server."
},
"tomlsmith.server.arguments": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"scope": "window",
"description": "Additional arguments passed to tomlsmith-lsp. Changing this setting automatically restarts the language server."
},
"tomlsmith.server.environment": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"default": {},
"scope": "window",
"description": "Environment variables added when launching tomlsmith-lsp. Changing this setting automatically restarts the language server."
},
"tomlsmith.toml.version": {
"type": "string",
"enum": [
"1.0",
"1.1"
],
"default": "1.1",
"scope": "window",
"description": "TOML language version used for validation and formatting. TOML 1.1 is the default and accepts TOML 1.0 documents; select 1.0 explicitly for files consumed by 1.0-only tools. Takes effect immediately without restarting the language server."
},
"tomlsmith.format.indentWidth": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 16,
"default": null,
"scope": "window",
"description": "Indent width used by the formatter. When null the formatter follows the editor tab size."
},
"tomlsmith.format.lineWidth": {
"type": "integer",
"minimum": 40,
"maximum": 320,
"default": 100,
"scope": "window",
"description": "Preferred line width used by the formatter."
},
"tomlsmith.format.lineEnding": {
"type": "string",
"enum": [
"preserve",
"lf",
"crlf"
],
"default": "preserve",
"scope": "window",
"description": "Line-ending policy used by the formatter."
},
"tomlsmith.format.generatedFiles": {
"type": "string",
"enum": [
"skip",
"format"
],
"default": "skip",
"scope": "window",
"description": "Whether Format Document touches generated files such as Cargo.lock, poetry.lock, pdm.lock, uv.lock, or files carrying an @generated marker."
}
}
}
},
"scripts": {
"build": "esbuild src/extension.ts --bundle --platform=node --format=cjs --target=node20 --external:vscode --outfile=dist/extension.js --sourcemap",
"bundle-server": "node scripts/bundle-server.mjs",
"test": "vitest run",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"vscode-languageclient": "10.1.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/vscode": "1.95.0",
"@vscode/test-electron": "3.1.0",
"esbuild": "0.28.2",
"typescript": "7.0.2",
"vitest": "4.1.11",
"vscode-oniguruma": "^2.0.1",
"vscode-textmate": "^9.3.2"
}
}