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

Auto semi-colon in .sol files

Open JIC1816 opened this issue 3 years ago • 1 comments
trafficstars

I have a question: does this extension includes a functionallity to add a semi-colon at the end of the line with ctrl + s? If yes, how can I activate it?

JIC1816 avatar Jul 29 '22 03:07 JIC1816

@JIC1816 I am afraid we don't support this feature yet.

In general we avoid formatting syntactically incorrect code (solidity code requires the semi-colons - unlike javascript for instance).

We have discussed adding support for inserting the semi-colons through completions. Another approach may be to insert a semicolon on the previous line on the enter key if the previous line would be syntactically correct with the colon.

kanej avatar Aug 02 '22 13:08 kanej