juanfranblanco / vscode-solidity

Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
MIT License
904 stars 194 forks source link

Vscode solidity can only prompt keywords #200

Closed huwentao1 closed 3 years ago

huwentao1 commented 3 years ago

Vscode solidity can only prompt keywords image this is my solidity config, my version is v0.0.76, is my config error ? image

juanfranblanco commented 3 years ago

Hi apologies for that, autocomplete is not working at the moment as I am awaiting to the new language server in solidity, to replace the current parser. cc @chriseth ;)

huwentao1 commented 3 years ago

Hi apologies for that, autocomplete is not working at the moment as I am awaiting to the new language server in solidity, to replace the current parser. cc @chriseth ;)

That's it~ For this situation, is there currently an auto-completion plugin available? Or how long does it take your plug-in to realize this function?

juanfranblanco commented 3 years ago

No there is not a plugin available, the whole point is that if this is done in solidity it will be available by other IDEs. For me to do this, it will take I guess a week or two, but it won't be super beneficial. The original thought was to do the port in vscode and pass the learnings to solidity.

chriseth commented 3 years ago

@juanfranblanco sorry to disappoint you, but we do not plan to make the LSP cope with incorrect source.

juanfranblanco commented 3 years ago

@chriseth ohhh so it wont work for autocomplete then? what features are you thinking? Edit.. I might need to rethink the strategy then!

chriseth commented 3 years ago

go to definition is the first goal we will implement

juanfranblanco commented 3 years ago

ah nice, i was half way through that in typescript, antlr is a slight pain as you cannot filter easily.

juanfranblanco commented 3 years ago

@chriseth I introduced an experimental package for solparse that includes abstract, receive and fallback statement support which were the ones breaking the plugin. My guess, is for now the best is to continue this way until the perfect solution is there, ill push fixes to solparse which is mainly pegjs. Obviously this retuns the idea of having constant support for pegjs, and looking at the current g4 file, I can see yul there too :). So this might require a conversation.

chriseth commented 3 years ago

I'm not sure I understand what you are talking about, but feel free to schedule a meeting.

juanfranblanco commented 3 years ago

Closing this as autcomplete is "working" now, there are many features missing, but those should be specific issues and resolve one by one. To name a few: dot autocompletion of struct properties, array support on library extensions.