x/tools/gopls: feature request: support more postfix snippets for primitive type #73367
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
Feature I want
Gopls has provided some postfix snippet, for example:
I believe we can add more useful postfix snippets:
[]byte!
: help to convert a string to a slice of bytes.string!
: help to convert a slices of bytes to a string.T!
: help to convert a type from another, the postfix will generate|(variable)
for users to input a type they want.|
is the cursor position. Further more, we may provide some primitive type if the variable is a primitive(float, int, uint, etc...).itoa!
: help to convert an int to stringIndeed we can provide a lot of helpful postfix snippets, not only the cases I mentioned above. Please kindly let me know your opinions about it. @adonovan @findleyr
I want to contribute these small features.
The text was updated successfully, but these errors were encountered: