Coder Social home page Coder Social logo

thebenforce / vscode-appsync-resolver-autocomplete Goto Github PK

View Code? Open in Web Editor NEW
24.0 1.0 0.0 1.12 MB

Adds autocomplete functionality to vscode when editing AWS AppSync resolver vtl files.

TypeScript 100.00%
appsync appsync-resolvers graphql velocity-template velocity vscode vscode-extension vscode-plugin hacktoberfest vtl-files

vscode-appsync-resolver-autocomplete's Introduction

vscode-appsync-resolver-autocomplete's People

Contributors

dependabot[bot] avatar thebenforce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-appsync-resolver-autocomplete's Issues

Visual Studio Code MacOS

Hello,

I have installed the autocomplete tool in Visual Studio Code on Mac.

The autocomplete does not appear to function in the .vtl file. I was curious if there is any additional configuration to get this working for me.

I just added it from the Marketplace, but have not changed any other settings.

Screenshot 2021-06-11 at 3 32 32 pm

Screenshot 2021-06-11 at 3 31 46 pm

I have tried restarting VS Code.

Regards,

Basic Template Previews

Use VelocityJs to render a preview of the vtl file. This will only provide a view with realtime updates. No AppSync methods or context data will be available.

Preview Data

Allow users to define context data globally, and per workspace.

AppSync Methods

Implement appsync methods as part of the velocity context.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No vsce personal access token specified. (set env "VSCE_TOKEN")

Unfortunately this error doesn’t have any additional information. Feel free to kindly ask the author of the semantic-release-vsce plugin to add more helpful information.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Feature Request: vtl tag

Hi!

It would be nice to be able to get the same code completion and syntax highlighting using a vtl tag on a template string like so:

// ts / js
const resolver = vtl`
#if($ctx.args.id)
  "true"
#else 
  "false"
#end
`;

I know this extension is for code completion only, but I'm assuming it uses the "velocity" language token / reference from another extension to be activated. Is it true?

I'm wondering what minimal work could be done in order to "enable" the language inside the string literal so both extensions would work.

Cheers!

EDIT:

How feasible is this?

package.json

    "contributions": {
      ...
      "grammar" : {
        "injectTo": [
          "source.js",
          "source.ts",
        ],
        "scopeName": "inline.velocity",
        "path": "./syntaxes/velocity.inline.json",
        "embeddedLanguages": {
          "meta.embedded.block.velocity": "velocity"
        }
      }
      ...

// syntaxes/velocity.inline.json

{
  "fileTypes": ["js", "ts"],
  "injectionSelector": "L:source -string -comment",
  "patterns": [
    {
      "name": "taggedTemplates",
      "contentName": "meta.embedded.block.velocity",
      "begin": "(`)(velocity|vtl)",
      "beginCaptures": {
        "1": {
          "name": "punctuation.definition.string.template.begin.js"
        },
        "2": {
          "name": "comment.line.velocity.js"
        }
      },
      "end": "`",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.template.end.js"
        }
      },
      "patterns": [
        { "include": "source.velocity" }
      ]
    }
  ],
  "scopeName": "inline.velocity"
}

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.