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: preserve comments when invoking fillstruct on partially filled composite literals #71312

Open
findleyr opened this issue Jan 17, 2025 · 1 comment
Assignees
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. 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

@findleyr
Copy link
Member

It looks like in #39804, there was a desire to preserve comments when filling partial literals, but it was deemed too challenging.

I think with recent work by @madelinekalil to reassemble the resulting literal, this should be a solvable problem, and a nice UX improvement.

Tentatively assigning for v0.18.0. It would be nice to bundle this improvement.

@findleyr findleyr added this to the gopls/v0.18.0 milestone Jan 17, 2025
@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 Jan 17, 2025
@gabyhelp gabyhelp added the FeatureRequest Issues asking for a new feature that does not need a proposal. label Jan 17, 2025
@xzbdmw
Copy link

xzbdmw commented Jan 17, 2025

I think with recent work by @madelinekalil to reassemble the resulting literal, this should be a solvable problem, and a nice UX improvement.

Does this mean we manipulate string literals for each field? I was trying to attach snippets on fillstrcut when clients have capabilities (#70432) , and thought I have to do that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. 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

5 participants