Skip to content

x/tools/gopls: feature: support SnippetTextEdit in codeactions #70432

@xzbdmw

Description

@xzbdmw

gopls version

.

go env

.

What did you do?

Jdtls's preview version has this feature, and lsp has snippetTextEdit merged

What did you see happen?

iShot_2024-11-19_06.57.51.mp4

What did you expect to see?

With snippets, for extract function/method/variable, we can change function/variable name in two places at the same time; for fill struct, all the right side of property assignment can be a snippet node; and for generate missing function/method, we can select the panic("unimplemented") so user can replace it right away.

Editor and settings

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions