qiuxiang / coc-solidity

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

new upgrade breaks solidity (remappings) #3

Closed TortoiseHive closed 2 years ago

TortoiseHive commented 2 years ago

I was using:

"solidity.remappings": [ "@openzeppelin=./dependencies/openzeppelin-contracts-4.4.2", "@chainlink=./dependencies/chainlink-brownie-contracts@1.1.1" ],

Without that, the LSP dont start (using brownie here).

Can you add this back?

OS: Mac OS

image

The LSP is not working at all

qiuxiang commented 2 years ago

New lsp not support remappings. Only support include_path just like official compiler solc. It looks like your dependencies directory are dependencies not node_modules. Why not just use npm to manage dependencies?

TortoiseHive commented 2 years ago

New lsp not support remappings. Only support include_path just like official compiler solc. It looks like your dependencies directory are dependencies not node_modules. Why not just use npm to manage dependencies?

brownie installs dependencies on home folder so we decided to put the dependencies in the project (to improve navigation on emacs (my coworker uses and dont have LSP yet))

Its possible to do the remappings in solc with include_path? Would be awesome if could to use the @openzepellin in the file

https://docs.soliditylang.org/en/v0.8.11/path-resolution.html#import-remapping

qiuxiang commented 2 years ago

Ok, if solc supports remapping, I should also support it in this lsp.

TortoiseHive commented 2 years ago

New remaps are working perfectly, thanks!

EDIT:

This new server is awesome, this is how i configured:

"solidity.remapping": { "@openzeppelin": "./dependencies/openzeppelin-contracts-4.4.2" },