Skip to content

Commit

Permalink
chore: Run prettier against project (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated authored Jun 29, 2023
1 parent 3058e58 commit 101ffc3
Show file tree
Hide file tree
Showing 8 changed files with 557 additions and 556 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CHANGELOG.md
out/
package-lock.json
22 changes: 10 additions & 12 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
}
]
}
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Visual Studio Code extension for working with the [Noir programming language](ht

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

* Syntax highlighting
* Compile errors and warnings on file save
* Useful snippets for common code patterns
- Syntax highlighting
- Compile errors and warnings on file save
- Useful snippets for common code patterns

## Requirements

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

## Settings

* __Noir: Enable LSP__ _(noir.enableLSP)_ - If checked, the extension will launch the Language Server via `nargo lsp` and communicate with it.
* __Noir: Nargo Flags__ _(noir.nargoFlags)_ - Additional flags may be specified if you require them to be added when the extension calls `nargo lsp`.
* __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.
* __Noir > Trace: Server__ _(noir.trace.server)_ - Setting this to `"messages"` or `"verbose"` will log LSP messages between the Client and Server. Useful for debugging.
- **Noir: Enable LSP** _(noir.enableLSP)_ - If checked, the extension will launch the Language Server via `nargo lsp` and communicate with it.
- **Noir: Nargo Flags** _(noir.nargoFlags)_ - Additional flags may be specified if you require them to be added when the extension calls `nargo lsp`.
- **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.
- **Noir > Trace: Server** _(noir.trace.server)_ - Setting this to `"messages"` or `"verbose"` will log LSP messages between the Client and Server. Useful for debugging.

## Changelog

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

The project provides a few useful commands via npm scripts:

* `npm run package` - Builds the project and packages it into a `.vsix` file which can be manually installed for testing.
* `npm run esbuild` - Builds the project with esbuild to output `out/extension.js` and `out/extension.js.map`.
* `npm run test-compile` - Check types with TypeScript. Useful since esbuild doesn't typecheck.
* `npm run format` - Formats all the code in the repository.
* `npm run check-format` - Checks the formatting in the repository.
- `npm run package` - Builds the project and packages it into a `.vsix` file which can be manually installed for testing.
- `npm run esbuild` - Builds the project with esbuild to output `out/extension.js` and `out/extension.js.map`.
- `npm run test-compile` - Check types with TypeScript. Useful since esbuild doesn't typecheck.
- `npm run format` - Formats all the code in the repository.
- `npm run check-format` - Checks the formatting in the repository.
44 changes: 22 additions & 22 deletions language-configuration.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"comments": {
"lineComment": "//",
"blockComment": [ "/*", "*/" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""]
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""]
]
}
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""]
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""]
]
}
230 changes: 115 additions & 115 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,123 +1,123 @@
{
"name": "vscode-noir",
"displayName": "Noir Language Support",
"description": "Noir support for Visual Studio Code",
"version": "0.0.3",
"publisher": "noir-lang",
"keywords": [
"noir",
"noir-lang"
"name": "vscode-noir",
"displayName": "Noir Language Support",
"description": "Noir support for Visual Studio Code",
"version": "0.0.3",
"publisher": "noir-lang",
"keywords": [
"noir",
"noir-lang"
],
"icon": "noir.png",
"engines": {
"vscode": "^1.67.0"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/noir-lang/vscode-noir"
},
"bugs": {
"url": "https://github.com/noir-lang/vscode-noir/issues"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"onLanguage:noir"
],
"main": "./out/extension",
"contributes": {
"commands": [
{
"command": "noir.restart",
"title": "Noir: Restart Language Server"
}
],
"icon": "noir.png",
"engines": {
"vscode": "^1.67.0"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/noir-lang/vscode-noir"
},
"bugs": {
"url": "https://github.com/noir-lang/vscode-noir/issues"
},
"categories": [
"Programming Languages"
"snippets": [
{
"language": "noir",
"path": "./snippets/snippets.json"
}
],
"activationEvents": [
"onLanguage:noir"
],
"main": "./out/extension",
"contributes": {
"commands": [
{
"command": "noir.restart",
"title": "Noir: Restart Language Server"
}
],
"snippets": [
{
"language": "noir",
"path": "./snippets/snippets.json"
}
],
"languages": [
{
"id": "noir",
"aliases": [
"Noir",
"noir"
],
"extensions": [
".nr"
],
"configuration": "./language-configuration.json"
}
"languages": [
{
"id": "noir",
"aliases": [
"Noir",
"noir"
],
"grammars": [
{
"language": "noir",
"scopeName": "source.nr",
"path": "./syntaxes/noir.tmLanguage.json"
}
"extensions": [
".nr"
],
"configuration": {
"type": "object",
"title": "Noir Language Server configuration",
"properties": {
"noir.nargoFlags": {
"scope": "resource",
"type": "string",
"description": "Space-separated list of flags to pass to the nargo CLI"
},
"noir.nargoPath": {
"scope": "resource",
"type": "string",
"description": "Absolute path to the nargo CLI (detected in PATH if not specified)"
},
"noir.enableLSP": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enable the language server"
},
"noir.trace.server": {
"scope": "resource",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VS Code and the language server."
}
}
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "noir",
"scopeName": "source.nr",
"path": "./syntaxes/noir.tmLanguage.json"
}
],
"configuration": {
"type": "object",
"title": "Noir Language Server configuration",
"properties": {
"noir.nargoFlags": {
"scope": "resource",
"type": "string",
"description": "Space-separated list of flags to pass to the nargo CLI"
},
"noir.nargoPath": {
"scope": "resource",
"type": "string",
"description": "Absolute path to the nargo CLI (detected in PATH if not specified)"
},
"noir.enableLSP": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enable the language server"
},
"noir.trace.server": {
"scope": "resource",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VS Code and the language server."
}
},
"scripts": {
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"package": "vsce package",
"test-compile": "tsc -p ./",
"format": "prettier --write .",
"check-format": "prettier --check .",
"deploy": "vsce publish"
},
"dependencies": {
"vscode-languageclient": "^8.0.3",
"which": "^3.0.1"
},
"devDependencies": {
"@types/node": "^12.12.0",
"@types/vscode": "1.67.0",
"@types/which": "^3.0.0",
"@typescript-eslint/parser": "^5.59.9",
"esbuild": "^0.17.19",
"eslint": "^8.42.0",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"vsce": "^2.15.0"
}
}
},
"scripts": {
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"package": "vsce package",
"test-compile": "tsc -p ./",
"format": "prettier --write .",
"check-format": "prettier --check .",
"deploy": "vsce publish"
},
"dependencies": {
"vscode-languageclient": "^8.0.3",
"which": "^3.0.1"
},
"devDependencies": {
"@types/node": "^12.12.0",
"@types/vscode": "1.67.0",
"@types/which": "^3.0.0",
"@typescript-eslint/parser": "^5.59.9",
"esbuild": "^0.17.19",
"eslint": "^8.42.0",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"vsce": "^2.15.0"
}
}
Loading

0 comments on commit 101ffc3

Please sign in to comment.