qiuxiang / coc-solidity

Solidity language server for coc.nvim
MIT License
48 stars 0 forks source link

Allow remapping for outside project folder #13

Closed otavioschwanck closed 1 year ago

otavioschwanck commented 1 year ago

i trying to remap for brownie using:

  "solidity.remapping": {
    "@OpenZeppelin": "~/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.6.0/"
  },

and i solc tries to:

image
qiuxiang commented 1 year ago

remapping not support ~/, you should use absolute path.

See https://docs.soliditylang.org/en/latest/path-resolution.html#import-remapping

otavioschwanck commented 1 year ago

remapping not support ~/, you should use absolute path.

See https://docs.soliditylang.org/en/latest/path-resolution.html#import-remapping

only settings the remapping doesn't fixes, but this fixes:

  "solidity.remapping": {
    "@OpenZeppelin": "OpenZeppelin/openzeppelin-contracts@4.6.0"
  },
  "solidity.includePath": "/Users/otavio/.brownie/packages/",

Thanks for the answer