Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM). It is designed to be a more secure alternative to Solidity, the most popular language for writing smart contracts on the Ethereum blockchain. Vyper is a statically-typed language with a syntax that is similar to Python, making it easy to learn and use for developers who are already familiar with Python. This plugin provides support for writing, compiling, and deploying Vyper smart contracts in JetBrains IDE's.
- Syntax highlighting for
.vy
and.vyi
files - Action to create new Vyper files
- Find references
- Brace matcher
- Auto-complete
- Runs the compiler inside Docker, so you basically need only IDEA and Docker :) ;
- Nevertheless, pre-alpha.
To build and run the project, open it in IntelliJ IDEA. Then, run the "Run Plugin" configuration, which is already set up in the project.
Alternatively, use the buildPlugin
task to build it.
After that, locate the created .zip
in /bild/distributions
folder and add it as external plugin ("Install Plguin from Disk... ").
To test the plugin without installation you might run runIde
task in gradle, which will execute an IDEA instance with the plugin installed.
To generate files for the plugin we use the Grammar Kit plugin. To generate the files, you should have the plugin installed.
- Run the "Generate Parser Code" task in the
Vyper.bnf
file. That generatesBaseVyperParser.java
file andpsi
files.- When grammar elements are removed, old
psi
files are not deleted automatically. Just delete the wholepsi
folder and regenerate it.
- When grammar elements are removed, old
- Run the "Generate JFlex Lexer" task in the
Vyper.bnf
file. That generates_BaseVyperLexer.flex
file. - Run the "Run JFlex Generator" task in the
_BaseVyperLexer.flex
file. That generates_BaseVyperLexer.java
file.
More documentation: See JetBrains Grammar-Kit.