Skip to content
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

Open
stamblerre opened this issue Aug 8, 2019 · 2 comments
Open

x/tools/gopls: autogenerate documentation for supported configurations #33544

stamblerre opened this issue Aug 8, 2019 · 2 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Aug 8, 2019

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 by gopls 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 of gopls's clients, such as VSCode-Go, vim-go, govim, etc.

Current settings include:

"gopls": {
    // user-facing
    "env": {}, // the environment to use when loading packages
    "buildFlags": [], // the build flags to use when loading packages
    "usePlaceholders": true, // if the user wants placeholders when they complete an item
    "hoverKind": "FullDocumentation", // the amount of documentation to show on hover, one of NoDocumentation, Synopsis, SingleLine, FullDocumentation
    
    // experimental configurations
    "wantCompletionDocumentation": true, // if the user wants to see documentation in completion items
    "wantSuggestedFixes": true, // offer fixes to apply along with diagnostics
    "experimentalDisabledAnalyses": [], // list of analyses to disable in diagnostics
    "useDeepCompletions": true, // show completions for symbols in imported packages
}

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.

@ermik

This comment has been minimized.

Copy link

@ermik ermik commented Oct 4, 2019

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 go.mod in it).

gopls seems to ignore:

"go.toolsEnvVars": {
    "GOMOD": "${workspaceFolder}/src/go.mod"
},

as well as the same variable setting but passed via env configuration.

@stamblerre

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Dec 4, 2019

@ermik: That is something that will have to be implemented through VS Code Go, so I would recommend filing that issue in that repository.

@stamblerre stamblerre changed the title x/tools/gopls: document supported configurations x/tools/gopls: autogenerate documentation for supported configurations Dec 4, 2019
@stamblerre stamblerre modified the milestones: Unreleased, gopls unplanned Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.