KartanHQ / intellij-hardhat

Hardhat plugin for IntelliJ Platform
Apache License 2.0
3 stars 5 forks source link

[Feature Request]: Code completion for functions defined in contracts #245

Open arne-fuchs opened 1 year ago

arne-fuchs commented 1 year ago

Describe the bug

If I want to call functions from contracts in test, the plugin doesn't provide me code completion for those functions. Instead it tells me, that the function cannot be found.

Steps to reproduce the behavior

Let the plugin initialize the project. Look into the example Lock test in the test folder and try to find the withdraw() function via auto completion on the lock contract.

Expected behavior

No response

Screenshots

image image image

Additional context

No response

arne-fuchs commented 10 months ago

Any update on this issue?

arne-fuchs commented 10 months ago

I've just looked into the source code and saw that this is probably not in the scope of the project. Are you planning to implement it?

arne-fuchs commented 10 months ago

I am currently working on it. Will do a PR soon

arne-fuchs commented 10 months ago

First pre-release can be found on my GitHub here I'll do a pr as soon as the full functionality has been implemented. Currently it is required that the reference has to has the same name as the contract in lower-case. I am currently working at it and will do a follow-up release soon.

arne-fuchs commented 9 months ago

New release Added first tests and reference resolution. Will add some more tests and 1-2 features until I open a PR.

Here a little preview: image As you can see; functions which are defined in the contract such as deposit, withdraw are being suggested. Even variables like accountMap are being already suggested

arne-fuchs commented 9 months ago

Released a beta candidate I will test now the core features. If I do not find any fatal issues I'll open a PR in a week. Some features are missing but I'll add them in the future. For now it is already a big help implementing smart contracts.