Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support inlay hints in solidity #88

Open
kanej opened this issue Mar 7, 2022 · 3 comments
Open

Support inlay hints in solidity #88

kanej opened this issue Mar 7, 2022 · 3 comments
Labels
status:ready This issue is ready to be worked on type:feature New feature or request

Comments

@kanej
Copy link
Member

kanej commented Mar 7, 2022

VSCode has added an api for enhancing source code with inlays. Typescript uses it to display inferred types for variables, among other things:

image

Are there any places in solidity development we can leverage this feature?

@kanej kanej added the type:feature New feature or request label Mar 7, 2022
@sambacha
Copy link
Contributor

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: microsoft/vscode@17ed7bf
ref: microsoft/vscode#129037
more info: code.visualstudio.com/updates/v1_65

@alcuadrado
Copy link
Member

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.

@alcuadrado
Copy link
Member

This is an example of what I mentioned

image

@kanej kanej added status:ready This issue is ready to be worked on priority:low and removed priority:low labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:feature New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants