Visual Studio Code: solc version error

If Visual Studio Code is complaining about the solc version, this is how to get of the red squigglies:

  1. Make sure to manually set the solc version in the truffle-config
  compilers: {
    solc: {
       version: "0.7.5",    // Fetch exact version from solc-bin (default: truffle's version)
    }
  }
  1. Edit the Solidity Extension plugin settings. The “Default Compiler” should be “localNodeModule”