solidity
solidity copied to clipboard
allow setting remappings on lsp server init
What
enables client's of the lsp server to configure remappings during the initialisation command.
we already allow configuring import-paths through the initialisation, so hopefully this is not controversial.
the format expected to be passed in from the initialise json is:
{
"remappings": [
{context: "", prefix: "foo", target: "bar"},
...
]
}
Why
Because without being able to set remappings, the lsp-server throws errors for any project that requires them.
Related
- https://github.com/ethereum/solidity/issues/12603
- https://github.com/ethereum/solidity/pull/12994
Many thanks for your contribution @chrisfarms. We will take a close look at your work. :)
Thanks, addressed your review comments.
Will take a look at the lsp.py tests shortly (had not spotted those tests) 👍
added a very basic case to the python lsp tests
I rebased the PR to the latest develop
branch to fix the pylint CI failure
@chrisfarms I have been taking over this PR to finish the review, simply applying @leonardoalt's comments & adding a changelog item. I hope you don't mind.
@chrisfarms I have been taking over this PR to finish the review, simply applying @leonardoalt's comments & adding a changelog item. I hope you don't mind.
🙏 don't mind at all, thanks!
Adding @cameel for the final review.
Does this fix #12603? If so, please add #Fixes #12603
in the PR description.
Also needs rebase on latest develop
and approvals from @christianparpart and @leonardoalt.
Rebased and resolved conflicts, should be in a more workable state now.
Right now, we're choosing to close this PR as we won't allocate any time to this particular area.