Skip to main content

Solidity lexer for Pygments

Project description

Solidity lexer for Pygments, distributed as a PyPI package.

If you want pretty syntax highlighting in documentation for Solidity files, and you’re using Pygments, this might just be the thing for you.

Currently, Solidity keywords up to version 0.4.22 are included, to the best of my ability. MRs are welcome!


pip install pygments-lexer-solidity


Depends on doc-building infrastructure.


Have this in Sphinx’s

from sphinx.highlighting import lexers
from pygments_lexer_solidity import SolidityLexer
lexers['solidity'] = SolidityLexer()

Then use .. code-block:: solidity for Solidity code blocks.


BSD 2-clause simplified. See LICENSE.txt.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pygments-lexer-solidity, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size pygments-lexer-solidity-0.2.0.tar.gz (5.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page