Skip to content

Commit 101ffc3

Browse files
authored
chore: Run prettier against project (#24)
1 parent 3058e58 commit 101ffc3

File tree

8 files changed

+557
-556
lines changed

8 files changed

+557
-556
lines changed

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CHANGELOG.md
2+
out/
3+
package-lock.json

.vscode/launch.json

+10-12
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
]
15-
}
16-
]
17-
}
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
13+
}
14+
]
15+
}

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Visual Studio Code extension for working with the [Noir programming language](ht
66

77
This extension helps developers write, understand, and improve Noir code by providing:
88

9-
* Syntax highlighting
10-
* Compile errors and warnings on file save
11-
* Useful snippets for common code patterns
9+
- Syntax highlighting
10+
- Compile errors and warnings on file save
11+
- Useful snippets for common code patterns
1212

1313
## Requirements
1414

@@ -18,10 +18,10 @@ If you can't put `nargo` in your `PATH`, you can set an absolute path in the `Na
1818

1919
## Settings
2020

21-
* __Noir: Enable LSP__ _(noir.enableLSP)_ - If checked, the extension will launch the Language Server via `nargo lsp` and communicate with it.
22-
* __Noir: Nargo Flags__ _(noir.nargoFlags)_ - Additional flags may be specified if you require them to be added when the extension calls `nargo lsp`.
23-
* __Noir: Nargo Path__ _(noir.nargoPath)_ - An absolute path to a Nargo binary with the `lsp` command. This may be useful if Nargo is not within the `PATH` of your editor.
24-
* __Noir > Trace: Server__ _(noir.trace.server)_ - Setting this to `"messages"` or `"verbose"` will log LSP messages between the Client and Server. Useful for debugging.
21+
- **Noir: Enable LSP** _(noir.enableLSP)_ - If checked, the extension will launch the Language Server via `nargo lsp` and communicate with it.
22+
- **Noir: Nargo Flags** _(noir.nargoFlags)_ - Additional flags may be specified if you require them to be added when the extension calls `nargo lsp`.
23+
- **Noir: Nargo Path** _(noir.nargoPath)_ - An absolute path to a Nargo binary with the `lsp` command. This may be useful if Nargo is not within the `PATH` of your editor.
24+
- **Noir > Trace: Server** _(noir.trace.server)_ - Setting this to `"messages"` or `"verbose"` will log LSP messages between the Client and Server. Useful for debugging.
2525

2626
## Changelog
2727

@@ -31,8 +31,8 @@ You can find a full list of changes at https://github.com/noir-lang/vscode-noir/
3131

3232
The project provides a few useful commands via npm scripts:
3333

34-
* `npm run package` - Builds the project and packages it into a `.vsix` file which can be manually installed for testing.
35-
* `npm run esbuild` - Builds the project with esbuild to output `out/extension.js` and `out/extension.js.map`.
36-
* `npm run test-compile` - Check types with TypeScript. Useful since esbuild doesn't typecheck.
37-
* `npm run format` - Formats all the code in the repository.
38-
* `npm run check-format` - Checks the formatting in the repository.
34+
- `npm run package` - Builds the project and packages it into a `.vsix` file which can be manually installed for testing.
35+
- `npm run esbuild` - Builds the project with esbuild to output `out/extension.js` and `out/extension.js.map`.
36+
- `npm run test-compile` - Check types with TypeScript. Useful since esbuild doesn't typecheck.
37+
- `npm run format` - Formats all the code in the repository.
38+
- `npm run check-format` - Checks the formatting in the repository.

language-configuration.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"comments": {
3-
"lineComment": "//",
4-
"blockComment": [ "/*", "*/" ]
5-
},
6-
"brackets": [
7-
["{", "}"],
8-
["[", "]"],
9-
["(", ")"]
10-
],
11-
"autoClosingPairs": [
12-
["{", "}"],
13-
["[", "]"],
14-
["(", ")"],
15-
["\"", "\""]
16-
],
17-
"surroundingPairs": [
18-
["{", "}"],
19-
["[", "]"],
20-
["(", ")"],
21-
["\"", "\""]
22-
]
23-
}
2+
"comments": {
3+
"lineComment": "//",
4+
"blockComment": ["/*", "*/"]
5+
},
6+
"brackets": [
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
10+
],
11+
"autoClosingPairs": [
12+
["{", "}"],
13+
["[", "]"],
14+
["(", ")"],
15+
["\"", "\""]
16+
],
17+
"surroundingPairs": [
18+
["{", "}"],
19+
["[", "]"],
20+
["(", ")"],
21+
["\"", "\""]
22+
]
23+
}

package.json

+115-115
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,123 @@
11
{
2-
"name": "vscode-noir",
3-
"displayName": "Noir Language Support",
4-
"description": "Noir support for Visual Studio Code",
5-
"version": "0.0.3",
6-
"publisher": "noir-lang",
7-
"keywords": [
8-
"noir",
9-
"noir-lang"
2+
"name": "vscode-noir",
3+
"displayName": "Noir Language Support",
4+
"description": "Noir support for Visual Studio Code",
5+
"version": "0.0.3",
6+
"publisher": "noir-lang",
7+
"keywords": [
8+
"noir",
9+
"noir-lang"
10+
],
11+
"icon": "noir.png",
12+
"engines": {
13+
"vscode": "^1.67.0"
14+
},
15+
"license": "Apache-2.0",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/noir-lang/vscode-noir"
19+
},
20+
"bugs": {
21+
"url": "https://github.com/noir-lang/vscode-noir/issues"
22+
},
23+
"categories": [
24+
"Programming Languages"
25+
],
26+
"activationEvents": [
27+
"onLanguage:noir"
28+
],
29+
"main": "./out/extension",
30+
"contributes": {
31+
"commands": [
32+
{
33+
"command": "noir.restart",
34+
"title": "Noir: Restart Language Server"
35+
}
1036
],
11-
"icon": "noir.png",
12-
"engines": {
13-
"vscode": "^1.67.0"
14-
},
15-
"license": "Apache-2.0",
16-
"repository": {
17-
"type": "git",
18-
"url": "https://github.com/noir-lang/vscode-noir"
19-
},
20-
"bugs": {
21-
"url": "https://github.com/noir-lang/vscode-noir/issues"
22-
},
23-
"categories": [
24-
"Programming Languages"
37+
"snippets": [
38+
{
39+
"language": "noir",
40+
"path": "./snippets/snippets.json"
41+
}
2542
],
26-
"activationEvents": [
27-
"onLanguage:noir"
28-
],
29-
"main": "./out/extension",
30-
"contributes": {
31-
"commands": [
32-
{
33-
"command": "noir.restart",
34-
"title": "Noir: Restart Language Server"
35-
}
36-
],
37-
"snippets": [
38-
{
39-
"language": "noir",
40-
"path": "./snippets/snippets.json"
41-
}
42-
],
43-
"languages": [
44-
{
45-
"id": "noir",
46-
"aliases": [
47-
"Noir",
48-
"noir"
49-
],
50-
"extensions": [
51-
".nr"
52-
],
53-
"configuration": "./language-configuration.json"
54-
}
43+
"languages": [
44+
{
45+
"id": "noir",
46+
"aliases": [
47+
"Noir",
48+
"noir"
5549
],
56-
"grammars": [
57-
{
58-
"language": "noir",
59-
"scopeName": "source.nr",
60-
"path": "./syntaxes/noir.tmLanguage.json"
61-
}
50+
"extensions": [
51+
".nr"
6252
],
63-
"configuration": {
64-
"type": "object",
65-
"title": "Noir Language Server configuration",
66-
"properties": {
67-
"noir.nargoFlags": {
68-
"scope": "resource",
69-
"type": "string",
70-
"description": "Space-separated list of flags to pass to the nargo CLI"
71-
},
72-
"noir.nargoPath": {
73-
"scope": "resource",
74-
"type": "string",
75-
"description": "Absolute path to the nargo CLI (detected in PATH if not specified)"
76-
},
77-
"noir.enableLSP": {
78-
"scope": "resource",
79-
"type": "boolean",
80-
"default": true,
81-
"description": "Enable the language server"
82-
},
83-
"noir.trace.server": {
84-
"scope": "resource",
85-
"type": "string",
86-
"enum": [
87-
"off",
88-
"messages",
89-
"verbose"
90-
],
91-
"default": "off",
92-
"description": "Traces the communication between VS Code and the language server."
93-
}
94-
}
53+
"configuration": "./language-configuration.json"
54+
}
55+
],
56+
"grammars": [
57+
{
58+
"language": "noir",
59+
"scopeName": "source.nr",
60+
"path": "./syntaxes/noir.tmLanguage.json"
61+
}
62+
],
63+
"configuration": {
64+
"type": "object",
65+
"title": "Noir Language Server configuration",
66+
"properties": {
67+
"noir.nargoFlags": {
68+
"scope": "resource",
69+
"type": "string",
70+
"description": "Space-separated list of flags to pass to the nargo CLI"
71+
},
72+
"noir.nargoPath": {
73+
"scope": "resource",
74+
"type": "string",
75+
"description": "Absolute path to the nargo CLI (detected in PATH if not specified)"
76+
},
77+
"noir.enableLSP": {
78+
"scope": "resource",
79+
"type": "boolean",
80+
"default": true,
81+
"description": "Enable the language server"
82+
},
83+
"noir.trace.server": {
84+
"scope": "resource",
85+
"type": "string",
86+
"enum": [
87+
"off",
88+
"messages",
89+
"verbose"
90+
],
91+
"default": "off",
92+
"description": "Traces the communication between VS Code and the language server."
9593
}
96-
},
97-
"scripts": {
98-
"vscode:prepublish": "npm run esbuild-base -- --minify",
99-
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
100-
"esbuild": "npm run esbuild-base -- --sourcemap",
101-
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
102-
"package": "vsce package",
103-
"test-compile": "tsc -p ./",
104-
"format": "prettier --write .",
105-
"check-format": "prettier --check .",
106-
"deploy": "vsce publish"
107-
},
108-
"dependencies": {
109-
"vscode-languageclient": "^8.0.3",
110-
"which": "^3.0.1"
111-
},
112-
"devDependencies": {
113-
"@types/node": "^12.12.0",
114-
"@types/vscode": "1.67.0",
115-
"@types/which": "^3.0.0",
116-
"@typescript-eslint/parser": "^5.59.9",
117-
"esbuild": "^0.17.19",
118-
"eslint": "^8.42.0",
119-
"prettier": "^2.8.8",
120-
"typescript": "^5.1.3",
121-
"vsce": "^2.15.0"
94+
}
12295
}
96+
},
97+
"scripts": {
98+
"vscode:prepublish": "npm run esbuild-base -- --minify",
99+
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
100+
"esbuild": "npm run esbuild-base -- --sourcemap",
101+
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
102+
"package": "vsce package",
103+
"test-compile": "tsc -p ./",
104+
"format": "prettier --write .",
105+
"check-format": "prettier --check .",
106+
"deploy": "vsce publish"
107+
},
108+
"dependencies": {
109+
"vscode-languageclient": "^8.0.3",
110+
"which": "^3.0.1"
111+
},
112+
"devDependencies": {
113+
"@types/node": "^12.12.0",
114+
"@types/vscode": "1.67.0",
115+
"@types/which": "^3.0.0",
116+
"@typescript-eslint/parser": "^5.59.9",
117+
"esbuild": "^0.17.19",
118+
"eslint": "^8.42.0",
119+
"prettier": "^2.8.8",
120+
"typescript": "^5.1.3",
121+
"vsce": "^2.15.0"
122+
}
123123
}

0 commit comments

Comments
 (0)