Giter Site home page Giter Site logo

edilsonalves / vscode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prisma/language-tools

0.0 1.0 0.0 3.51 MB

VSCode extension adding syntax highlighting, formatting, auto-completion, jump-to-definition and linting for .prisma files.

Home Page: https://marketplace.visualstudio.com/items?itemName=Prisma.prisma

License: Apache License 2.0

TypeScript 55.57% Shell 18.19% JavaScript 26.24%

vscode's Introduction

vscode

Adds syntax highlighting, formatting, jump-to-definition and linting for .prisma files.

This plugin is designed for Prisma 2. Information about the new datamodel syntax can be found here.

Features

  • Syntax highlighting
  • Auto-formatting
  • Linting
  • Jump-to-definition
  • Auto-completion (coming soon)

It also includes an End-to-End test.

Install

Preview

Structure

.
--- client // Language Client
|   --- src
|       --- extension.ts // Language Client entry point
--- package.json // The extension manifest
--- server // Language Server
    --- src
        --- server.ts // Language Server entry point

Development

  • Run npm install in this folder. This installs all necessary npm modules in both the client and server folder.
  • Run yarn watch.
  • Open VS Code on this folder.
  • Switch to the debug viewlet.
  • Select Launch Client from the drop down.
  • Run the launch config.
  • If you want to debug the server as well use the launch configuration Attach to Server afterwards or select the launch configuration Client + Server at once.
  • A new file should open in the [Extension Development Host] instance of VSCode.
  • Change the language to Prisma.
  • Make a change to the syntax
  • To reload, press the reload button in VSCode ( Developer: Inspect TM Scopes is helpful for debugging syntax issues )

Testing

Instructions on manual testing can be found here.

End-to-End tests:

  • Run npm install in this folder.
  • Open VS Code on this folder.
  • Switch to the debug viewlet.
  • Select Language Server E2E Test from the drop down.
  • Run the launch config.
  • Open the debug console to view the test results.

Publishing

The extension is automatically published using a Azure Devops Personal Access Token via Github actions (see .github/workflows/publish.yml).

Note that the personal access token is only valid for a year and will need to be renewed manually.

Manual Publishing

To do a manual publish, please follow these steps:

  1. Increment the package version
  2. Update to latest pinned binary release in the Prisma CLI's package.json under prisma.version.
  3. Run yarn package
  4. Go to https://marketplace.visualstudio.com/manage/publishers/Prisma
  5. Click the ��� More Actions
  6. Drag prisma-x.x.x.vsix into the browser and click upload.

This will take about an hour before the update is available.

vscode's People

Contributors

carmenberndt avatar ejoebstl avatar jjangga0214 avatar matinsasan avatar matthewmueller avatar prisma-bot avatar schickling avatar sytten avatar timsuchanek avatar

Watchers

 avatar

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.