zed-industries / extensions

Extensions for the Zed editor
797 stars 331 forks source link

VHDL #1312

Open myclark opened 2 weeks ago

myclark commented 2 weeks ago

Check for existing issues

Language

VHDL

Tree Sitter parser link

https://github.com/jpt13653903/tree-sitter-vhdl

Language server link

https://github.com/VHDL-LS/rust_hdl

Misc notes

No response

breynard0 commented 1 week ago

I second this. I would absolutely switch to Zed for my main VHDL editor if this were implemented.

breynard0 commented 1 week ago

In fact, I have some free time. I'll see if I can put something together

rapgenic commented 1 week ago

Hi, if it can be useful a first implementation had been done here, functional but not yet merged due to partially missing snippet support: #729

I have actually been using this for quite some time on my own projects

breynard0 commented 1 week ago

@rapgenic Alright, great. The snippet support looks fairly comprehensive to me, what is missing? Also, I see there was some conversation about migrating to a new tree-sitter parser. Earlier today, I attempted to get something working, and I ran into the same printf issues that you did. Your implementation of the LSP is much cleaner than what I came up with too.

So if some more snippets are added, and perhaps migrated to the new parser, do you think that that will be good to get it into the extension repo?

rapgenic commented 1 week ago

The snippet support looks fairly comprehensive to me, what is missing?

Basically https://github.com/zed-industries/zed/issues/12739. This means that entity instantiations completions (which rust_hdl provides as snippets) are not inserted into the editor.

Video del 2024-09-04 08-49-27.webm

new tree-sitter parser.

Regarding this, I have tried multiple times to get it working: first of all removing the printf statements: this gets it to build correctly and to load in Zed. However, as reported in the PR it seems that the parsed syntax tree is full of errors! (i.e. it is not parsing the code correctly/completely). In the end I stopped trying because the previous grammar is working well for me. Of course I have no problem with a newer parser, as long as it works as well, of course :)

So if some more snippets are added, and perhaps migrated to the new parser, do you think that that will be good to get it into the extension repo?

Yes definitely. (mainly the snippets)