Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @tomholford on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
96c387d to
e8067ab
Compare
|
When this feature release? |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
I'm trying to run this on https://github.com/SunWeb3Sec/DeFiHackLabs (repo chosen arbitrarily) and see almost zero LSP functions:
-
completions are very sparse and seem not to allow to complete what the code around uses

-
no go to definition seem to work at all
-
same for renames
-
at least, LSP server downloads fine and seem to format the project fine
Have I done something wrong, is it a regular experience with Solidity LSP or can we make it better?
https://github.com/NomicFoundation/hardhat-vscode/tree/development/server states all those features.
e8067ab to
9971fcf
Compare
|
@SomeoneToIgnore: Thanks for marking as draft. Quick update: Had to focus on other priorities, but will be able to pivot back to this soon. At this point I have some of the LSP features working: go to definition, basic type tooltips, auto-formatting, syntax highlighting. I'm going to try to take another crack at getting the advanced features mentioned in the I have pushed a wip commit with my progress so far. I am new to this project (and Rust) and could use help if you have a moment. Do you happen to know why the |
|
Great news! |
eacd1ef to
0cbd5e9
Compare
@SomeoneToIgnore I have rebased on |
|
This is going to have some conflicts with #7467, so we're going to land that first. |
0cbd5e9 to
fe2f935
Compare
@maxdeviant Thanks for the heads up. Now that #7467 is merged, I rebased this branch on edit: cc @SomeoneToIgnore |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
I have not noticed any QOL improvements in the project I linked above since the last review:
- zero rename, tooltips or go to definition capabilities still
- while the completion list got bigger, it seems that now it just tries to add every possible thing to the completion list?
E.g. here it allows me to autocomplete every "struct" after the.which does not seem right at all:

Is there a public project that I can try where something from above works?
|
Great point about VSCode, I've tried to use https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity extension and found its functionality quite morbid too. Speaking of
I've noticed that VSCode's plugin is able to show those, yet Zed's does not at all? Also notice that there's hovers shown too, but those seem quite useless information-wise. I would still want get down to the bottom of #7152 (comment) comment:
I see no "go to definition" and hovers for https://github.com/SunWeb3Sec/DeFiHackLabs but see those in the PR description. |
For feature parity I would compare with this which uses the same LSP under the hood |
Thanks for the feedback. Any suggestions on how to proceed from here? Tried to print debug output to the console, but no luck with that. |
|
Just a heads up - we are very soon going to be moving most of Zed's built-in languages into installable extensions (#7096). Solidity is a major enough language that I'm ok with merging this in the meantime. But once the extension system lands, we will probably remove this code and put it into a new It would be good to understand why some of the LSP features aren't working for @SomeoneToIgnore . @tomholford so just to confirm - the LSP works for you reliably? What Solidity projects are you testing against? |
Thanks for the heads up. And that sounds good, I'm happy to help any way that I can.
Confirming that the features described in the PR's Preview section above WOMM. I have been using my fork (with periodic rebases on main) for other projexts. As a test project to record the gifs above, I have been using this: |
|
I see that things like Java are being added as Zed extensions: zed-industries/extensions#57 Maybe, it's worth converting this into the extension and submitting a PR there. |
| @@ -0,0 +1,43 @@ | |||
| ;; Method and Function declarations | |||
| (contract_declaration (_ | |||
| (function_definition | |||
There was a problem hiding this comment.
Zed doesn't use tags.scm. Could you remove this one?
Good call, going to close this and reopen as an extension. |





Context
This adds support for Solidity to zed
Resolves zed-industries/extensions#160
Preview
Syntax Highlighting
Go To Definition
Auto-Formatting
Tooltips