Git Product home page Git Product logo

smithy-intellij's Introduction

Smithy IntelliJ

Build Status

WARNING: This repository in development. All interfaces are subject to change.

Smithy IntelliJ provides IDE integration for the Smithy IDL within IntelliJ IDEA. It utilizes smithy-language-server for its Language Server Protocol implementation.

Managing Smithy model dependencies while using the plugin

When using the Smithy Intellij Plugin, dependencies used by the model within the workspace must be specified, so that the plugin can inject them when launching the Smithy Language Server. Dependencies must be specified in the workspace at /build/smithy-dependencies.json or .smithy.json, listing all the required artifacts along with their source repositories:

{
  "artifacts": [
    "software.amazon.smithy:smithy-aws-traits:1.7.0",
    "software.amazon.smithy:smithy-aws-iam-traits:1.7.0",
    "com.example.my-traits:0.0.1"
  ],
  "repositories": [
    "file:/Users/me/.m2/repository/",
    "https://repo.maven.apache.org/maven2/"
  ]
}

Running this plugin for development

Clone the smithy-language-server repository to a separate directory: git clone [email protected]:awslabs/smithy-language-server.git ~/smithy-language-server

Change to that directory, and build and publish the locally: cd ~/smithy-language-server && ./gradlew build publishToMavenLocal

From this plugin directory, use ideRun task to start a sandboxed instance of IntelliJ with the plugin loaded: ./gradlew runIde

Developing the Lexer and Parser classes

The classes located at /src/main/gen are generated. SmithyLexer is generated from the Smithy.Flex file via the generateSmithyLexer Gradle task. SmithyParser and its PSI implementation classes are generated from the Smithy.bnf file via the generateSmithyParser Gradle task. The generateSmithyParser task requires JDK11 or higher. When using JDK11 or higher, both tasks will be run prior to compilation during a standard Gradle build.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

smithy-intellij's People

Contributors

amazon-auto avatar jordonphillips avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

smithy-intellij's Issues

Add "find by selector" support

The IDE will have a menu option to “find by selector”, which will improve the experience for writing selectors for traits or custom validators. When a selector is entered into the dialog, all matching shapes will be highlighted in the model. The same highlighting will be activated when a selector in the model is right-clicked and the “Find by selector” option is clicked on the context menu.

See smithy-lang/smithy-language-server#15 for implementation work on LSP to support this capability.

Code folding

Update the IDE plugin to support code folding on elements of the Smithy IDL, including service shapes, aggregate shapes, and the application of multiple traits to a shape. Documentation (// and /// ) and the use section will also be collapsible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.