Closed gzliudan closed 1 year ago
Hey @gzliudan, the explicitTypes
option was removed from Prettier Solidity in v1.0.0, that's why this is not working for you.
I think solhint will eventually have a rule (with auto-fix) for this, which should be enough to fill this use case. But that's outside of the scope of the hardhat-vscode plugin.
According to #456, this issue seems can be solved by:
VSCode settings
{
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
},
"solidity.formatter": "forge"
}
and foundry.toml
[fmt]
int_types = "long"
When I use hardhat-vscode to format solidity contract codes, the
uint
type can not becomeuint256
automatically.file .prettierrc.js:
file .vscode/settings.json