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.
- Syntax highlighting
- Auto-formatting
- Linting
- Jump-to-definition
- Auto-completion (coming soon)
It also includes an End-to-End test.
- Get the Prisma Extension from the Visual Studio Marketplace.
.
--- 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
- 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 configurationClient + 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 )
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.
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.
To do a manual publish, please follow these steps:
- Increment the package version
- Update to latest pinned binary release in the Prisma CLI's package.json under prisma.version.
- Run
yarn package
- Go to https://marketplace.visualstudio.com/manage/publishers/Prisma
- Click the ��� More Actions
- Drag
prisma-x.x.x.vsix
into the browser and click upload.
This will take about an hour before the update is available.