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.6.0 are included, to the best of my ability. MRs are welcome!

Installation

pip install pygments-lexer-solidity

Usage

Depends on doc-building infrastructure.

Sphinx

Have this in Sphinx’s conf.py:

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

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

Command-line

If you just want to test a local copy of the lexer on the CLI:

% pygmentize -x -l pygments_lexer_solidity/lexer.py:SolidityLexer example.sol

License

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.

Source Distribution

pygments-lexer-solidity-0.4.0.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file pygments-lexer-solidity-0.4.0.tar.gz.

File metadata

  • Download URL: pygments-lexer-solidity-0.4.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.0

File hashes

Hashes for pygments-lexer-solidity-0.4.0.tar.gz
Algorithm Hash digest
SHA256 133a88dec215bc93d1aa68819dd45d4848bc538e86c95b9879ca430364375daa
MD5 aeaf80f4ba7ee69e4a17415344267393
BLAKE2b-256 147437a5fc63811b9e86ca0619f28d05c9b4579376e1fe776ba8ed1af8e03357

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page