Emacs Solidity Mode
A simple language mode for the Solidity language. It is a constant work in progress as the language itself also progresses. For information about Solidity check the Tutorial and the Features wiki pages.
You can simply load the file in your emacs but the recommended way to install it is either via el-get or MELPA.
If you don’t know how to use el-get you can find more information on its webpage. First install el-get and then (in emacs), press
Alt+x (this is in emacs notation written as
M-x ) and then type
el-get-install. This will prompt you for a package, type
solidity-mode and hit enter, this should install all you need.
By default solidity-mode associates itself with any files ending in
el-get then you should have a specific package initializing lisp file. If not then you can put these
anywhere in your
Regardless of where you installed solidity mode from, you need to require the package:
(append that line to your
Provide path to solc binary
solc binary is assumed to be located at
/usr/bin/solc. Wherever that is not the case you would have to manually
set the location of the binary like below:
(setq solidity-solc-path "/home/lefteris/ew/cpp-ethereum/build/solc/solc")
Note: This better be set before requiring solidity mode.
[Optional] Flycheck interface
Solidity mode can also interface with flycheck if you have it. Make sure to download and install the flycheck package. Then configure it to either work on all modes or enable it only for solidity mode.
- Syntax highlighting
- On the fly syntax checking with flycheck
More features are planned, which would interface with the solidity libraries.