Skip to content

Add Syntax Highlighting to Solidity Files in Github

Wyatt Barnes edited this page Dec 27, 2018 · 2 revisions

Add a .gitattributes file in your repository, and add:

*.sol linguist-language=Solidity

As of 12/27/2018 09:54 CST, the language highlighting will not work if there is a ^ present with the Solidity version.

So, instead of pragma solidity ^0.4.17; you must use pragma solidity 0.4.17;

Clone this wiki locally