Open xzbdmw opened 3 days ago
I think the intent of the video is to illustrate that applying the code action causes the selection and cursor to change, not just a mere text edit. The mechanism is similar to a snippet completion, which returns a snippet of text with placeholder fields in it.
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
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?
https://github.com/user-attachments/assets/6fcb6b07-150b-4401-bd07-fee7a93cb129
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