-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathpackage.json
More file actions
293 lines (293 loc) · 8.21 KB
/
Copy pathpackage.json
File metadata and controls
293 lines (293 loc) · 8.21 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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
{
"name": "nix-ide",
"displayName": "Nix IDE",
"description": "Full Nix language support with/without external language servers",
"version": "0.5.9",
"publisher": "jnoortheen",
"icon": "images/icon.png",
"license": "MIT",
"engines": {
"vscode": ">=1.112.0"
},
"categories": [
"Programming Languages",
"Formatters",
"Snippets"
],
"keywords": [
"nix"
],
"bugs": {
"url": "https://github.com/nix-community/vscode-nix-ide/issues"
},
"homepage": "https://github.com/nix-community/vscode-nix-ide",
"repository": {
"type": "git",
"url": "https://github.com/nix-community/vscode-nix-ide"
},
"main": "dist/extension.js",
"contributes": {
"languages": [
{
"id": "nix",
"aliases": [
"Nix",
"nix"
],
"extensions": [
".nix"
],
"icon": {
"dark": "images/icon.svg",
"light": "images/icon.svg"
},
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "nix",
"scopeName": "source.nix",
"path": "./dist/nix.tmLanguage.json"
},
{
"scopeName": "markdown.nix.codeblock",
"path": "./dist/injection.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.nix": "nix"
}
}
],
"snippets": [
{
"language": "nix",
"path": "./snippets.json"
}
],
"configuration": {
"title": "Nix",
"properties": {
"nix.formatterPath": {
"default": "nixfmt",
"markdownDescription": "Full path to the nix formatter executable. This setting won't take effect if `nix.enableLanguageServer` is enabled; if that's the case, you can instead set formatter via `nix.serverSettings` (see [README](https://github.com/nix-community/vscode-nix-ide#lsp-plugin-support) for examples)",
"oneOf": [
{
"type": "string",
"enum": [
"nixfmt",
"nix3-fmt",
"alejandra",
"treefmt",
"nixpkgs-fmt"
],
"markdownEnumDescriptions": [
"[nixfmt](https://github.com/NixOS/nixfmt) - The official formatter for the Nix language",
"[nix3-fmt](https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-fmt) - Use the flake configured formatter",
"[alejandra](https://github.com/kamadorueda/alejandra) - The Uncompromising Nix Code Formatter",
"[treefmt](https://github.com/numtide/treefmt-nix) - All in one formatter",
"[nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt) - Deprecated as it is no longer maintained"
]
},
{
"type": "array",
"items": "string",
"minItems": 1
}
]
},
"nix.serverPath": {
"default": "nixd",
"description": "Location of the nix language server command.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": "string",
"minItems": 1
}
]
},
"nix.enableLanguageServer": {
"type": "boolean",
"default": false,
"description": "Use LSP instead of nix-instantiate and the formatter configured via `nix.formatterPath`."
},
"nix.serverSettings": {
"type": "object",
"default": {},
"description": "Settings passed to the language server on configuration requests."
},
"nix.hiddenLanguageServerErrors": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Error notifications from the language server for these request types will be suppressed.",
"examples": [
[
"textDocument/definition",
"textDocument/documentSymbol"
]
]
}
}
},
"configurationDefaults": {
"[nix]": {
"editor.insertSpaces": true,
"editor.tabSize": 2
},
"explorer.fileNesting.patterns": {
"flake.nix": "flake.lock"
},
"files.associations": {
"flake.lock": "json"
}
},
"commands": [
{
"title": "Restart Language Server",
"category": "Nix",
"command": "nix-ide.restartLanguageServer"
}
],
"semanticTokenTypes": [
{
"id": "boolean",
"description": "Style for boolean literals",
"superType": "keywords"
},
{
"id": "constant",
"description": "Style for `builtins` constants"
},
{
"id": "path",
"description": "Style for paths"
},
{
"id": "punctuations",
"description": "Style for punctuations"
}
],
"semanticTokenModifiers": [
{
"id": "builtin",
"description": "Style for `builtins` variables and functions"
},
{
"id": "conditional",
"description": "Style for conditional operators and keywords"
},
{
"id": "delimiter",
"description": "Style for delimiter punctuations"
},
{
"id": "escape",
"description": "Style for escape sequences in strings"
},
{
"id": "parenthesis",
"description": "Style for parenthesis"
},
{
"id": "unresolved",
"description": "Style for unresolved variables"
},
{
"id": "withAttribute",
"description": "Style for attributes from `with`"
}
],
"semanticTokenScopes": [
{
"language": "nix",
"scopes": {
"boolean": [
"constant.language.boolean.nix"
],
"constant.builtin": [
"support.const.nix"
],
"function.builtin": [
"support.function.nix"
],
"struct.builtin": [
"support.const.nix"
],
"path": [
"constant.other.path.nix"
],
"string": [
"string.quoted.double.nix"
],
"string.escape": [
"constant.character.escape.nix"
],
"variable": [
"variable.other.nix"
],
"variable.unresolved": [
"invalid.nix"
],
"parameter": [
"variable.parameter.name.nix"
],
"property": [
"entity.other.attribute-name.single.nix"
],
"*.withAttribute": [
"markup.underline"
],
"operator": [
"entity.name.operator.nix"
]
}
}
]
},
"devDependencies": {
"@commitlint/cli": "^20.5.3",
"@commitlint/config-conventional": "^20.5.3",
"@types/bun": "^1.3.13",
"@types/command-exists": "^1.2.3",
"@types/node": "^25.7.0",
"@types/vscode": "^1.112.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.9.1",
"js-yaml": "^4.1.1",
"lefthook": "^2.1.6",
"ovsx": "^0.10.12",
"tmlanguage-generator": "^0.6.8",
"typescript": "^6.0.3",
"vscode-tmgrammar-test": "^0.1.3",
"yaml": "^2.9.0"
},
"scripts": {
"prebuild": "mkdir -p dist && bun run src/grammar/build.ts",
"build": "bun build src/extension.ts --outdir=dist --external=vscode --target=node --format=cjs",
"postinstall": "lefthook install",
"clean": "rm -rd dist",
"prepackage": "rm -f *.vsix",
"package": "bun run build --minify && bun run vsce package --no-dependencies",
"publish:ovsx": "ovsx publish *.vsix --pat '$OVS_PAT'",
"publish:vsce": "vsce publish",
"publish": "bun run package && bun run publish:vsce && bun run publish:ovsx",
"test": "bun run build --sourcemap && vscode-tmgrammar-snap 'syntax-tests/*.nix'",
"full-test": "vscode-test",
"pretest": "bun x biome check --write src"
},
"dependencies": {
"command-exists": "^1.2.9",
"vscode-languageclient": "^9.0.1",
"vscode-variables": "^1.0.1"
}
}