hardhat-vscode icon indicating copy to clipboard operation
hardhat-vscode copied to clipboard

Support for Solidity code snippets in Markdown

Open PaulRBerg opened this issue 1 year ago • 2 comments

See context on Twitter: Is there any VSCode extension that can enable syntax highlighting for Solidity code blocks in Markdown?

It appears that Juan Blanco's extension offers support for Solidity code snippets in Markdown.

PaulRBerg avatar May 20 '24 14:05 PaulRBerg

This seems to be done with an injection grammar: https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#injection-grammars

We should see if there are any guidelines for the standard markdown extension.

kanej avatar May 22 '24 09:05 kanej

Hey @kanej & @PaulRBerg just made a PR for this issue https://github.com/NomicFoundation/hardhat-vscode/pull/575

michaeltomasik avatar Jun 05 '24 17:06 michaeltomasik

Released as part of v0.8.4

kanej avatar Jul 26 '24 10:07 kanej

I am using v0.8.6, and I'm still not able to see highlighted Solidity code.

SCR-20241120-mpvl

PaulRBerg avatar Nov 20 '24 12:11 PaulRBerg

Released as part of v0.8.4

Thanks for the report, this is a bug in our release scripts (the extra syntax file wasn't being copied). I have put together a fix and will ping here when it goes out in the next release (likely Monday).

kanej avatar Nov 22 '24 14:11 kanej

Released as part of v0.8.4

Thanks for the report, this is a bug in our release scripts (the extra syntax file wasn't being copied). I have put together a fix and will ping here when it goes out in the next release (likely Monday).

@PaulRBerg, that is v0.8.7 released with the build script changes, you should be able to see Solidity highlighting in Markdown files:

https://github.com/NomicFoundation/hardhat-vscode/releases/tag/v0.8.7

kanej avatar Nov 25 '24 11:11 kanej