-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: autogenerate documentation for supported configurations #33544
Comments
Just checking if any of these can help with choosing the inferred package root as that would be a workaround for a subset of #32394 where project directory is a step above package root folder (one that has
as well as the same variable setting but passed via |
@ermik: That is something that will have to be implemented through VS Code Go, so I would recommend filing that issue in that repository. |
Change https://golang.org/cl/252322 mentions this issue: |
We should also auto-generate documentation for the commands and code lenses available in |
I guess this is not actually fixed given the above. |
Change https://golang.org/cl/256358 mentions this issue: |
Add a new field to the options JSON, EnumValues. Use it to automatically generate the documentation for enums. Fix the displayed type to be "enum" rather than the full-qualified Go type name. To make this easy, I changed the various enum constants to be strings, with values matching their configuration values. It may be possible to automatically parse them in the future, but we can get to that later. The documentation for hoverKind's private values is a little janky. I didn't want to build a way to hide them. We can hardcode it if we really care. Updates golang/go#33544. Change-Id: Ia5cc958e347d5ff041068c57726d530809bb0f70 Reviewed-on: https://go-review.googlesource.com/c/tools/+/256358 Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
I'm still unclear on what extra documentation we want. I believe the result of discussion was that we don't want to automatically connect commands to the extension. @stamblerre, you said that we should document code lenses, but I don't understand where or why. Just so that users can disable them in the |
Also, should we enable documentation of the debugging options? |
I had thought that https://github.com/golang/tools/blob/master/internal/lsp/source/command.go was structured in such a way that we could easily generate documentation from it. I think it would be nice to have a page describing our code lenses to make them more discoverable and so that users can understand how to enable/disable them. Since we've agreed not to expose commands through the VS Code Go command palette, I think this issue is resolved in that there are no more blockers for VS Code Go. I will mention the above in a general issue about documentation.
Yeah, that sounds good. |
command.go would indeed be easy to generate documentation from. I think you're saying you want it? So I'll add them to the json and write a documentation page, separate from the settings page since there are no settings that refer to commands. |
That would be awesome--thanks! I mentioned it on #41591 in case you wanted to close this issue. |
Change https://golang.org/cl/257737 mentions this issue: |
gopls
has a number of configurations, some of which are meant for users to set manually. The rest are used primarily to "hide" experimental features and are only meant for use bygopls
developers and testers.We should formalize the set of
gopls
configurations that we want to make public for users, and we should consolidate these configurations with the settings ofgopls
's clients, such as VSCode-Go, vim-go, govim, etc.Current settings include:
We should add the settings used by clients to this issue to get a better understanding of how we can provide a more unified experience.
We should autogenerate this documentation from the comments in the internal/lsp/source/options.go.
The text was updated successfully, but these errors were encountered: