Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

p-/vscode-vyper

Repository files navigation

Vyper for VS Code (alpha)

This extension brings the Vyper smart contract language for Ethereum to Visual Studio Code (a mix between editor and IDE). Like Vyper itself (and even more so) this extension is alpha software and should just be used to toy around with vyper. Compatibility with later versions cannot be guaranteed.

This extension is basically the result of hacking the Python highlighting support together with the ability to call command line tools from the Go extension and displaying the results of the StdError in a user-friendly way.

Features

  • Provides the Vyper: Build Contract command that when called on a saved file shows the actual build errors.
  • Syntax Higlighting for Vyper (*.vy, *.v.py) files inclusive Vyper specific types like int128.
  • Build on Save

Vyper for VS Code in action:

Build Contract

Requirements

Visual Studio Code 1.2 or later

Requires a virtual Vyper 0.0.3 env to be set up exactly as described in the Vyper tutorial. This means that the folder ~/vyper-venv/bin should contain a python and a vyper executable.

Extension Settings

The path to the virtual Python environment can be set in the User Settings (Ctrl+Shift+P) + 'Open User Settings' via the vyper.virtualEnvPath variable.

VS Code User Settings

The 'Build on Save' feature can be disabled with the vyper.buildOnSave setting property.

Installation

This extension is not published (and maybe never will).

To manually install it:

  1. Download the vscode-vyper-0.0.x.vsix from the releases
  2. Inside VS Code: Call the Extensions: Install from VSIX... command via the command palette (Ctrl+Shift+P)
  3. Select the downloaded file. And you're ready to go!

Install VSIX

Development

You're gladely invited to help with the development of this extension!

To start and debug this extension:

  1. Clone this repo
  2. Open it in VS Code
  3. Press F5 to start a dev environment with this extension running

About

Vyper support for VS Code (alpha)

Resources

License

Stars

Watchers

Forks

Packages

No packages published