-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9bf8902
Showing
12 changed files
with
2,513 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: | ||
push: | ||
tags: ["v*"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
name: Build and deploy | ||
jobs: | ||
build: | ||
if: github.event_name == 'pull_request' | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: borales/[email protected] | ||
with: | ||
cmd: install # will run `yarn install` command | ||
- uses: borales/[email protected] | ||
with: | ||
cmd: build # will run `yarn build` command | ||
|
||
deploy: | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- uses: lannonbr/[email protected] | ||
with: | ||
# using the git tag as a version, dropping the first character (v) | ||
args: "publish -p $VSCE_TOKEN --no-git-tag-version `git describe --abbrev=0 | tail -c +2`" | ||
env: | ||
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
client/node_modules | ||
node_modules | ||
node_modules | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
out/**/*.map | ||
src/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Smithy VS Code extension | ||
|
||
[Smithy](https://awslabs.github.io/smithy/) is an open-source protocol-agnostic interface definition language maintained and published by AWS. | ||
|
||
This VSCode extension provides syntax coloring and rich editor features when editing .smithy files files. | ||
|
||
It works by communicating to a language-server published in | ||
https://github.com/disneystreaming/smithy-language-server/ | ||
|
||
## Installation | ||
|
||
## This extension contains: | ||
|
||
* Client code to communicate with a [Smithy LSP server](https://github.com/disnenystreaming/smithy-language-server). In particular, this should handle : | ||
* Jump to definition | ||
* Diagnostics | ||
* Basic auto-completion | ||
* Simple grammar for Smithy syntax highlighting | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"comments": { | ||
// symbol used for single line comment. Remove this entry if your language does not support line comments | ||
"lineComment": "//" | ||
}, | ||
// symbols used as brackets | ||
"brackets": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"] | ||
], | ||
// symbols that are auto closed when typing | ||
"autoClosingPairs": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
], | ||
// symbols that can be used to surround a selection | ||
"surroundingPairs": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"name": "smithy", | ||
"description": "Smithy vscode extension", | ||
"author": "Olivier Mélois", | ||
"version": "0.0.0-SNAPSHOT", | ||
"icon": "images/hammer.png", | ||
"publisher": "disneystreaming", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/disneystreaming/vscode-smithy" | ||
}, | ||
"categories": [], | ||
"keywords": [ | ||
"smithy" | ||
], | ||
"activationEvents": [ | ||
"onLanguage:smithy" | ||
], | ||
"main": "./out/extension", | ||
"contributes": { | ||
"configuration": { | ||
"type": "object", | ||
"title": "vscode-smithy configuration", | ||
"properties": { | ||
"smithyLsp.maxNumberOfProblems": { | ||
"scope": "resource", | ||
"type": "number", | ||
"default": 100, | ||
"description": "Controls the maximum number of problems produced by the server." | ||
}, | ||
"smithyLsp.trace.server": { | ||
"scope": "window", | ||
"type": "string", | ||
"enum": [ | ||
"off", | ||
"messages", | ||
"verbose" | ||
], | ||
"default": "verbose", | ||
"description": "Traces the communication between VS Code and the language server." | ||
}, | ||
"smithyLsp.version": { | ||
"scope": "window", | ||
"type": "string", | ||
"default": "0.0.0-cb3ffec", | ||
"description": "Version of the Smithy LSP (see https://github.com/disneystreaming/smithy-language-server)" | ||
} | ||
} | ||
}, | ||
"languages": [ | ||
{ | ||
"id": "smithy", | ||
"extensions": [ | ||
".smithy" | ||
], | ||
"configuration": "./language-configuration.json" | ||
} | ||
], | ||
"grammars": [ | ||
{ | ||
"language": "smithy", | ||
"scopeName": "source.smithy", | ||
"path": "./smithy.tmGrammar.json" | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "yarn compile", | ||
"prepublishOnly": "vsce package -o extension.vsix", | ||
"compile": "tsc -p ./", | ||
"watch": "tsc -watch -p ./", | ||
"test": "yarn compile", | ||
"build": "vsce package --yarn", | ||
"format": "prettier --write '**/*.{ts,js,json,yml}'", | ||
"format-check": "prettier --check '**/*.{ts,js,json,yml}'" | ||
}, | ||
"files": [ | ||
"extension.vsix" | ||
], | ||
"engines": { | ||
"vscode": "^1.43.0" | ||
}, | ||
"dependencies": { | ||
"vscode-languageclient": "^6.1.3" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^8.0.3", | ||
"@types/node": "^12.12.0", | ||
"@types/vscode": "1.43.0", | ||
"@typescript-eslint/parser": "^2.3.0", | ||
"eslint": "^6.4.0", | ||
"mocha": "^8.1.1", | ||
"typescript": "^4.0.2", | ||
"vsce": "^1.87.1", | ||
"vscode-test": "^1.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
{ | ||
"scopeName": "source.smithy", | ||
"patterns": [ | ||
{ | ||
"include": "#expression" | ||
}, | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"include": "#traits" | ||
}, | ||
{ | ||
"include": "#camelcase" | ||
}, | ||
{ | ||
"include": "#strings" | ||
} | ||
], | ||
"repository": { | ||
"expression": { | ||
"patterns": [ | ||
{ | ||
"include": "#reserved" | ||
}, | ||
{ | ||
"include": "#paren-expression" | ||
}, | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"include": "#traits" | ||
} | ||
] | ||
}, | ||
"traits": { | ||
"match": "@([\\w]+)\\b", | ||
"name": "support.function" | ||
}, | ||
"camelcase": { | ||
"match": "\\b([A-Z](\\w+))\\b", | ||
"name": "entity.name.class" | ||
}, | ||
"strings": { | ||
"patterns": [ | ||
{ | ||
"end": "\"", | ||
"begin": "\"", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.string.begin.smithy" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})", | ||
"name": "constant.character.escape.smithy" | ||
}, | ||
{ | ||
"match": "\\\\.", | ||
"name": "invalid.illegal.unrecognized-string-escape.smithy" | ||
} | ||
], | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.string.end.smithy" | ||
} | ||
}, | ||
"name": "string.quoted.double.smithy" | ||
} | ||
] | ||
}, | ||
"reserved": { | ||
"match": "\\b(service|operation|resource|structure|list|metadata|namespace|use|map|union|string|integer|set|blob|boolean|string|byte|short|integer|long|float|double|bigInteger|bigDecimal|timestamp|document)\\b", | ||
"name": "keyword.control.reserved" | ||
}, | ||
"builtin": { | ||
"match": "\\b(Blob|Boolean|String|Byte|Short|Integer|Long|Float|Double|BigInteger|BigDecimal|Timestamp|Document)\\b", | ||
"name": "constant.language" | ||
}, | ||
"definition": { | ||
"patterns": [ | ||
{ | ||
"match": "(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+", | ||
"captures": { | ||
"1": { | ||
"name": "variable.parameter.smithy" | ||
}, | ||
"2": { | ||
"name": "meta.colon.smithy" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"traitparam": { | ||
"patterns": [ | ||
{ | ||
"match": "(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+", | ||
"captures": { | ||
"1": { | ||
"name": "variable.parameter.smithy" | ||
}, | ||
"2": { | ||
"name": "meta.colon.smithy" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"paren-expression": { | ||
"begin": "\\{", | ||
"end": "\\}", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.bracket.open" | ||
} | ||
}, | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.bracket.close" | ||
} | ||
}, | ||
"name": "definition.group", | ||
"patterns": [ | ||
{ | ||
"include": "#expression" | ||
}, | ||
{ | ||
"include": "#builtin" | ||
}, | ||
{ | ||
"include": "#traits" | ||
}, | ||
{ | ||
"include": "#camelcase" | ||
}, | ||
{"include": "#definition"}, | ||
{ | ||
"include": "#strings" | ||
} | ||
] | ||
}, | ||
"comments": { | ||
"patterns": [ | ||
{ | ||
"include": "#block-comments" | ||
}, | ||
{ | ||
"end": "(?!\\G)", | ||
"begin": "(^[ \\t]+)?(?=//)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "punctuation.whitespace.comment.leading.scala" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"end": "\\n", | ||
"begin": "//", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.comment.scala" | ||
} | ||
}, | ||
"name": "comment.line.double-slash.scala" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.