Closed soraliu closed 9 months ago
@qiuxiang Could help to review?
what is the lsp client you are using? coc.nvim or nvim-lspconfig?
I'm using coc.nvim
I have added rootPatterns to coc-solidity, you can try it first.
How about nvim-lspconfig
? I've been trying to get the go-to definition
to work but with no success. Can I change something in the config files to support this functionality?
So far, the solidity-ls does not support to go definition in monorepo. Because
workspaceFolders
returns the root path which contains.git
, so consider the following caseThe code like
import "hardhat/console.sol";
will go toROOT/node_modules/hardhat/console.sol
which does not exist.The PR will fix this case. And it will navigate to
ROOT/eth/hardhat-project/node_modules/hardhat/console.sol