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

Auto-completion does not work when a hybrid project uses a different source directory name

Open maguroid opened this issue 2 years ago • 0 comments
trafficstars

Problem

Auto-completion for the lib/* folder is not working when integrating Foundry with Hardhat, following the instructions from this link.

image

Changing the source directory name from contracts to src resolved the issue, which was confusing. It would be preferable if any directory name could be used without affecting auto-completion.

Steps to Reproduce

  1. Initialize a new Hardhat project:
    npx hardhat init
    
  2. Install the Foundry plugin for Hardhat:
    npm i -D @nomicfoundation/hardhat-foundry
    
  3. Edit the hardhat.config.ts file to include the import statement:
    import "@nomicfoundation/hardhat-foundry";
    
  4. Attempt to use auto-completion in Lock.sol for libraries under the lib/ directory, which does not appear.

maguroid avatar Nov 08 '23 12:11 maguroid