hardhat-vscode
hardhat-vscode copied to clipboard
Support inlay hints in solidity
VSCode has added an api for enhancing source code with inlays. Typescript uses it to display inferred types for variables, among other things:
Are there any places in solidity development we can leverage this feature?
the language status item is the preferred way to present language status reports for the active text editors, such as selected linter or notifying about a configuration problem.
There are two options: 1: inlay hints that are hh specific 2: inlay hints that are solidity specific
for the 2nd option you can see this extension: https://github.com/ConsenSys/vscode-solidity-auditor
Additional resources:
microsoft/vscode@a330b89/src/vscode-dts/vscode.d.ts#L11839
commit: https://github.com/microsoft/vscode/commit/17ed7bf82c385b9b29a458109c6d6a76049856c7 ref: https://github.com/microsoft/vscode/issues/129037 more info: code.visualstudio.com/updates/v1_65
Another thing that we can do with inline hints, ~copied from~ inspired by intellij: when a function parameter is a literal (not a variable, not a complex expression) we can show the argument name.
This is an example of what I mentioned