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. You can obtain it by using
el-get-install solidity-mode
.
You can also obtain solidity-mode from Melpa as can be seen here.
By default solidity-mode associates itself with any files ending in .sol
.
If using el-get
then you should have a specific package initializing lisp file. If not then you can put these
anywhere in your init.el
.
At the moment of writing this guide ethereum is not yet released so everything is built from source and not installed on a user’s system. You will probably have to provide the path to the solc binary executable. Here is an example:
(setq solidity-solc-path "/home/lefteris/ew/cpp-ethereum/build/solc/solc")
Solidity mode can also interface with flycheck if you have it. Simply add solidity-checker
to the list
of active flycheck checkers.
(require 'flycheck)
(require 'solidity-mode)
(add-to-list 'flycheck-checkers 'solidity-checker)
- Syntax highlighting
- Indentation
- On the fly syntax checking with flycheck
More features are planned, which would interface with the solidity libraries.