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: missing placeholder names for function parameters #60269

Closed
ShoshinNikita opened this issue May 17, 2023 · 2 comments
Closed

x/tools/gopls: missing placeholder names for function parameters #60269

ShoshinNikita opened this issue May 17, 2023 · 2 comments
Assignees
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@ShoshinNikita
Copy link

gopls version: master (242e5ed)

VSCode settings:

{
  "gopls": {
    "ui.completion.usePlaceholders": true,
    // ...
  }
}

Steps to reproduce:

  1. Enable gopls.ui.completion.usePlaceholders.
  2. Create a .go file without any imports.
  3. Try to complete a function call from some package (for example, log.Printf) - the completion response has placeholder but not their names.
  4. Try to complete the same function call (now with imported package) - the completion response has correct placeholders.
2023-05-17.20-01-03.mp4

Note: older versions of gopls didn't provide placeholders at all for cases when the package import was missing. Example:

2023-05-17.20-20-35.mp4
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels May 17, 2023
@gopherbot gopherbot added this to the Unreleased milestone May 17, 2023
@findleyr
Copy link
Contributor

Thank you.

CC @adonovan

This is related to the rewrite of unimported completions,

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/496596 mentions this issue: gopls/internal/lsp/source/completion: (unimported) add placeholders

@golang golang locked and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants