|
1 | 1 | # Smithy for VS Code |
2 | 2 |
|
3 | | -This package is a Visual Studio Code extension to recognize and highlight the |
4 | | -Smithy interface definition language (IDL). It can also be used as a TextMate |
5 | | -bundle in TextMate and [IntelliJ using a third-party plugin](https://www.jetbrains.com/help/idea/importing-textmate-bundles.html). |
| 3 | +Provides support for the [Smithy interface definition language][smithy]. |
6 | 4 |
|
7 | 5 | ## Features |
8 | 6 |
|
9 | | -This extension provides basic syntax highlighting of ".smithy" files. |
| 7 | +- Syntax highlighting of `.smithy` files |
| 8 | +- Snippets |
| 9 | +- Completions, jump to definition, and more, powered by [smithy-language-server][smithy-language-server] |
10 | 10 |
|
11 | | -Additionally, it provides [Snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets). |
| 11 | +## Configuration |
12 | 12 |
|
13 | | -## Installation |
14 | | - |
15 | | -This extension can be installed from the |
16 | | -[VS Code Extension Marketplace](https://marketplace.visualstudio.com/items?itemName=smithy.smithy-vscode-extension). |
17 | | - |
18 | | -To install from source, follow these steps: |
19 | | -* Clone the repository: `git clone https://github.com/awslabs/smithy-vscode.git && cd smithy-vscode` |
20 | | -* Run npm commands to install: |
21 | | -`npm install && npm run install-plugin` |
22 | | - |
23 | | -## Authoring a model |
24 | | -If your model requires dependencies, add a `smithy-build.json` file to the root of your project, specifying Maven dependencies, along with the |
25 | | -repositories where they can be located. |
26 | | -``` |
27 | | -{ |
28 | | - "version": "1.0", |
29 | | - "maven": { |
30 | | - "dependencies": ["software.amazon.smithy:smithy-aws-traits:1.40.0"], |
31 | | - "repositories": [{ "url": "https://repo1.maven.org/maven2/" }] |
32 | | - } |
33 | | -} |
34 | | -``` |
35 | | -Start authoring your Smithy model. Opening a `*.smithy` file will activate |
36 | | -the extension. |
37 | | - |
38 | | -## Use with any Maven private registry |
39 | | - |
40 | | -Follow [these instructions](https://get-coursier.io/docs/other-credentials#property-file) to set the credentials file for your Maven private registry. Here is an example for a Maven registry provided by GitHub: |
41 | | -``` |
42 | | -github.username=<ANY_USERNAME> |
43 | | -github.password=<YOUR_GITHUB_TOKEN> |
44 | | -github.host=maven.pkg.github.com |
45 | | -``` |
46 | | - |
47 | | -## Use with IntelliJ |
48 | | - |
49 | | -You can use this extension for syntax highlighting in IntelliJ by installing the |
50 | | -"TextMate bundle support" plugin and registering this repository as a bundle. |
51 | | -See the [IntelliJ documentation](https://www.jetbrains.com/help/idea/textmate.html) |
52 | | -for more details. |
53 | | - |
54 | | -## Release Notes |
55 | | - |
56 | | -### 0.9.0 - 2025-04-16 |
57 | | - |
58 | | -- Added setting to run the smithy-language-server using a specific executable [#106](https://github.com/smithy-lang/smithy-vscode/pull/106) |
59 | | -- Changed name of settings to `smithy.*` and deprecated old settings [#106](https://github.com/smithy-lang/smithy-vscode/pull/106) |
60 | | -- Added syntax highlighting for hovering on members [#107](https://github.com/smithy-lang/smithy-vscode/pull/107) |
61 | | -- Updated smithy-language-server version to 0.7.0 [#108](https://github.com/smithy-lang/smithy-vscode/pull/108) |
62 | | - |
63 | | -### 0.8.0 - 2025-03-10 |
| 13 | +You can configure the extension using [VSCode's settings][vscode-settings]. The |
| 14 | +following settings are supported: |
64 | 15 |
|
65 | | -- Updated smithy-language-server version to 0.6.0 [#103](https://github.com/smithy-lang/smithy-vscode/pull/103) |
66 | | -- Use language server for smithy-build.json support [#102](https://github.com/smithy-lang/smithy-vscode/pull/102) |
| 16 | +| Setting | Description | |
| 17 | +|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 18 | +| smithy.maxNumberOfProblems | Controls the maximum number of problems produced by the server.<br/>Default: `100` | |
| 19 | +| smithy.trace.server | Traces the communication between VS Code and smithy-language-server.<br/>Options: `"off"`, `"messages"`, `"verbose"`<br/>Default: `"verbose"` | |
| 20 | +| smithy.server.executable | Executable to run smithy-language-server, instead of the one managed by the extension. Can be the executable name if it is on your PATH, or an absolute path to the executable. If `null`, the extension will download it.<br/>Default: `null` | |
| 21 | +| smithy.server.version | Version of smithy-language-server to use. Ignored if `smithy.server.executable` is provided. | |
| 22 | +| smithy.server.diagnostics.minimumSeverity | Minimum severity of Smithy validation events to display in the editor.<br/>Options: `"NOTE"`, `"WARNING"`, `"DANGER"`, `"ERROR"`<br/>Default: `"WARNING"` |` |
67 | 23 |
|
68 | | -### 0.7.0 - 2024-11-26 |
69 | | - |
70 | | -- Updated smithy-language-server version to 0.5.0 [#97](https://github.com/smithy-lang/smithy-vscode/pull/97) |
71 | | -- Extension now starts when any Smithy files are found in the workspace [#96](https://github.com/smithy-lang/smithy-vscode/pull/96) |
72 | | - |
73 | | -### 0.6.1 - 2024-09-09 |
74 | | - |
75 | | -- Updated smithy-language-server version to 0.4.1 [#94](https://github.com/smithy-lang/smithy-vscode/pull/94) |
76 | | - |
77 | | -### 0.6.0 - 2024-08-02 |
78 | | - |
79 | | -- Updated smithy-language-server version to 0.4.0 [#89](https://github.com/smithy-lang/smithy-vscode/pull/89) |
80 | | -- Removed configuration for .smithy.lsp.log file [#89](https://github.com/smithy-lang/smithy-vscode/pull/89) |
81 | | -- Added configuration option for model validation minimum severity [#89](https://github.com/smithy-lang/smithy-vscode/pull/89) |
82 | | -- Added configuration option for only reloading the model on save [#89](https://github.com/smithy-lang/smithy-vscode/pull/89) |
83 | | - |
84 | | -### 0.5.4 - 2023-11-09 |
85 | | - |
86 | | -- Added configuration for LspLog file. [#82](https://github.com/smithy-lang/smithy-vscode/pull/82) |
87 | | -- Added `smithy-build.json` JSON Schema. [#76](https://github.com/smithy-lang/smithy-vscode/pull/76) |
88 | | -- Fixed grammar for `apply` statement. [#76](https://github.com/smithy-lang/smithy-vscode/pull/75) |
89 | | - |
90 | | -### 0.5.3 - 2023-03-17 |
91 | | - |
92 | | -- Added model formatting via Smithy Language Server 0.2.3. [#67](https://github.com/awslabs/smithy-vscode/pull/67) |
93 | | - |
94 | | -### 0.5.2 - 2022-12-27 |
95 | | - |
96 | | -- Updated to use [Smithy Language Server 0.2.2](https://github.com/awslabs/smithy-language-server/). |
| 24 | +## Installation |
97 | 25 |
|
98 | | -### 0.5.1 - 2022-09-29 |
| 26 | +You can install the extension from the [VS Code Extension Marketplace][marketplace], |
| 27 | +or [from source](#build-from-source). |
99 | 28 |
|
100 | | -- Updated to use [Smithy Language Server 0.2.1](https://github.com/awslabs/smithy-language-server/). |
101 | | -- Stopped switching focus to VSCode's output window when the extension receives a message. [#55](https://github.com/awslabs/smithy-vscode/pull/55) |
102 | | -- Allowed setting the root path to be used by the extension. [#54](https://github.com/awslabs/smithy-vscode/pull/54) |
103 | | -- Updated tests to use version 1.25.0 for Smithy packages. [#56](https://github.com/awslabs/smithy-vscode/pull/56) |
| 29 | +### Build from source |
104 | 30 |
|
105 | | -### 0.5.0 - 2022-08-29 |
| 31 | +To install from source, first clone the repo: |
106 | 32 |
|
107 | | -- Updated to use [Smithy Language Server 0.2.0](https://github.com/awslabs/smithy-language-server/) which adds support for |
108 | | -hover action and Smithy IDL 2 syntax. [#52](https://github.com/awslabs/smithy-vscode/pull/52) |
109 | | -- Added a new file icon for `*.smithy` files. [#51](https://github.com/awslabs/smithy-vscode/pull/51) |
| 33 | +```shell |
| 34 | +git clone https://github.com/smithy-lang/smithy-vscode.git |
| 35 | +cd smithy-vscode |
| 36 | +``` |
110 | 37 |
|
111 | | -### 0.4.0 - 2022-06-13 |
| 38 | +Install the extension's dependencies: |
112 | 39 |
|
113 | | -- Updated to work with Smithy 2.0 syntax. |
114 | | -- Used [Smithy Language Server](https://github.com/awslabs/smithy-language-server/) for language features including: |
115 | | -auto-completion, jump to definition, model validations as diagnostics. [#32](https://github.com/awslabs/smithy-vscode/pull/32) |
116 | | -- Added `Smithy:Selector:Run` and `Smithy:Selector:Clear` commands for highlighting the results of running an |
117 | | -expression on the model in a workspace. [#33](https://github.com/awslabs/smithy-vscode/pull/33) |
| 40 | +```shell |
| 41 | +npm install |
| 42 | +``` |
118 | 43 |
|
119 | | -### 0.3.0 - 2020-09-19 |
| 44 | +Install the extension: |
120 | 45 |
|
121 | | -- Updated to work with Smithy 1.0 syntax. |
| 46 | +```shell |
| 47 | +npm run install-plugin |
| 48 | +``` |
122 | 49 |
|
123 | | -### 0.2.0 - 2019-06-26 |
| 50 | +This will overwrite any existing installation of the extension with the locally |
| 51 | +built one. |
124 | 52 |
|
125 | | -- Add support for use statements. |
126 | | -- Add support for documentation comments. |
| 53 | +## License |
127 | 54 |
|
128 | | -### 0.1.0 |
| 55 | +This project is licensed under the Apache-2.0 License. |
129 | 56 |
|
130 | | -Initial release for Smithy IDL syntax highlighting. |
| 57 | +[smithy]: https://smithy.io |
| 58 | +[snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets |
| 59 | +[marketplace]: https://marketplace.visualstudio.com/items?itemName=smithy.smithy-vscode-extension |
| 60 | +[smithy-language-server]: https://github.com/smithy-lang/smithy-language-server.git |
| 61 | +[vscode-settings]: https://code.visualstudio.com/docs/configure/settings |
0 commit comments