zola icon indicating copy to clipboard operation
zola copied to clipboard

Add syntax highlighting for Solidity, Vyper, and Cairo

Open jakelang opened this issue 2 years ago • 3 comments

IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.

The place to discuss new features is the forum: https://zola.discourse.group/ If you want to add a new feature, please open a thread there first in the feature requests section.

Sanity check:

  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • [x] Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • [x] Have you created/updated the relevant documentation page(s)?

Description

This pull request adds syntax highlighting support for three languages from the Ethereum ecosystem.

  • Solidity: The most popular language for writing Ethereum smart contracts
  • Vyper: An alternative, emerging language for Ethereum smart contracts.
  • Cairo: A language used to write contracts on StarkNet, an L2 scaling solution for Ethereum using STARKs.

All of the syntax files are sourced from https://github.com/davidhq/SublimeEthereum at the commit mentioned in sublime/syntaxes/extra/README.md. I did not add this repository as a submodule because I used Sublime to generate .sublime-syntax files for Vyper and Cairo from their respective .tmlanguage files.

The aforementioned repository appears to be well-maintained with changes made 3 days ago to support Solidity 0.8.13. Credit goes to the maintainers of this repository for the syntax files.

jakelang avatar Mar 20 '22 17:03 jakelang

Thanks for that. I'm actually going to holdd off adding more syntaxes until https://github.com/getzola/zola/issues/1787 has been decided since I don't want to add something just to remove it.

Keats avatar Mar 21 '22 09:03 Keats

@Keats any decision re: #1787?

jakelang avatar Apr 10 '22 23:04 jakelang

The decision is not planned soon, especially since you can easily load your own syntaxes/themes.

Keats avatar Apr 11 '22 09:04 Keats