Skip to content

A Visual Studio Code extension to provide syntax highlighting for the Smithy IDL.

License

Notifications You must be signed in to change notification settings

srchase/smithy-vscode

 
 

Repository files navigation

Smithy for VS Code

This package is a Visual Studio Code extension to recognize and highlight the Smithy interface definition language (IDL). It can also be used as a TextMate bundle in TextMate and IntelliJ using a third-party plugin.

Features

This extension provides basic syntax highlighting of ".smithy" files.

Additionally, it provides Snippets.

Installation

This extension can be installed from the VS Code Extension Marketplace.

To install from source, follow these steps:

  • Clone the repository: git clone https://github.com/awslabs/smithy-vscode.git && cd smithy-vscode
  • Run npm commands to install: npm install && npm run install-plugin

Authoring a model

If your model requires dependencies, add a smithy-build.json file to the root of your project, specifying Maven dependencies, along with the repositories where they can be located.

{
    {
    "maven": {
      "dependencies": ["software.amazon.smithy:smithy-aws-traits:1.27.0"],
      "repositories": [{ "url": "https://repo1.maven.org/maven2/" }]
    }
  }
}

Start authoring your Smithy model. Opening a *.smithy file will activate the extension.

Use with any Maven private registry

Follow these instructions to set the credentials file for your Maven private registry. Here is an example for a Maven registry provided by GitHub:

github.username=<ANY_USERNAME>
github.password=<YOUR_GITHUB_TOKEN>
github.host=maven.pkg.github.com

Use with IntelliJ

You can use this extension for syntax highlighting in IntelliJ by installing the "TextMate bundle support" plugin and registering this repository as a bundle. See the IntelliJ documentation for more details.

Release Notes

0.5.2 - 2022-12-27

0.5.1 - 2022-09-29

  • Updated to use Smithy Language Server 0.2.1
  • Stop switching focus to VSCode's output window when the extension receives a message #55
  • Allow setting the root path to be used by the extension #54
  • Update tests to use version 1.25.0 for Smithy packages #56

0.5.0 - 2022-08-29

0.4.0 - 2022-06-13

  • Updated to work with Smithy 2.0 syntax.
  • Use Smithy Language Server for language features including: auto-completion, jump to definition, model validations as diagnostics. #32
  • Added Smithy:Selector:Run and Smithy:Selector:Clear commands for highlighting the results of running an expression on the model in a workspace. #33

0.3.0 - 2020-09-19

  • Updated to work with Smithy 1.0 syntax.

0.2.0 - 2019-06-26

  • Add support for use statements.
  • Add support for documentation comments.

0.1.0

Initial release for Smithy IDL syntax highlighting.

About

A Visual Studio Code extension to provide syntax highlighting for the Smithy IDL.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Smithy 61.1%
  • TypeScript 37.6%
  • JavaScript 1.3%