Open gundermanc opened 5 years ago
Hi Christian. Thank you for initiating this project. I'm very new to compiler/parser/lex and did spend some time understanding this article. I think Gopls option is very limited and blocked by Google's progress. I'm also torn between option 2 and 3. Option 2 does give us a good head start. But option 3 sounds mode fun! Practically speaking I prefer option 2, as we have limited time and resources, and given how popular VS Code extension is, I don't think the OSS tools will die anytime soon.
@benhu-msft sounds good! That was my thought as well. How does the following sound:
1) M1: Repackage the VS Code tools:
2) M2: grow into full LS post hackathon.
Btw: is anyone interested in taking point on VS Mac? I can support this effort but I don't own a Mac machine.
Alternatively, the debugger and testing integrations are both large pieces that will need dedicated effort as well.
Over the past 2 weekends, I've pushed an initial round of prototypes that 1) provide documentation tooltips, error squiggles for syntactic errors, basic colorization, structure guides, and outlining.
Now that the easy, tool-driven stuff is hackily working, I want to focus on defining and lighting up the critical parts of the experience and stabilizing the hacks into actual solutions.
Prioritized roadmap is:
1) Can build in the IDE and see errors in the error list 2) Basic parser with some completion support 3) Complete parser with full completion support 4) Debugger support 5) Code/symbol search support.
Thanks Christian. I took some time to read about VSIX and its concepts. Now I have a general picture of what we might need to do. Do you mind creating a documentation on the design/ architecture of this project? It will be helpful for extension beginners like me. Cheers.
Thanks Christian. I took some time to read about VSIX and its concepts. Now I have a general picture of what we might need to do. Do you mind creating a documentation on the design/ architecture of this project? It will be helpful for extension beginners like me. Cheers.
Absolutely! I'll start here and we can migrate it into the repo as we get stuff done.
1) Can build in the IDE and see errors in the error list: For this, we need to define a MEF part in the Go.Editor layer that will be responsible for managing builds and running go build
on the workspace. We then wire it up to build on VS Windows and VS Mac in Go.Windows and Go.Mac respectively.
2) Basic parser with some completion support: Current colorizer is provided via an initial draft of a lexer. Next steps are to build a parser for this lexer which is capable of producing an AST for a file. With this, we'll be able to walk the AST and generate a store of symbols appearing in the document.
3) Complete parser with full completion support: once the basic completion is implemented, we should be able to extend this to work across the entire workspace and between files. This same capability could be used to power symbolic search.
4) Debugger support: Will be provided by the community dlv
tool. This will need to be integrated with the VS debugger UX on the respective platforms. Note that I have the least experience with this, so this will require the most help.
5) Code/symbol search support: Once we have everything in place for completion, it should be relatively simple to use the symbol discovery mechanism to search symbols via an INavigateToItemProvider
Roadmap
Progress
Strategies
Strategies for making progress in this project.
Host Gopls language server
Pros:
Cons
Host OSS Go tools used by VS Code
Pros
Cons
From-scratch parser for Go + SDK Tools (godoc etc).
Pros
Cons
Please feel free to add to the discussion 👍