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

add smart paste to go comment #3554

Open
hyangah opened this issue Sep 27, 2024 · 2 comments
Open

add smart paste to go comment #3554

hyangah opened this issue Sep 27, 2024 · 2 comments
Labels
FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.

Comments

@hyangah
Copy link
Contributor

hyangah commented Sep 27, 2024

From anonymous response to the IDE user survey:

I often temporarily copy specs as comment to have it at sight.
These comments often are being disturbed by the go fmt.
This is most annoying if docs have eg. packet layout laid out in two or more lines.

Ideally, such marked comment, eg a /** */ block, could be made sticky
to the top of editor pane, like functions headers already do.

Indenting the pasted text will prevent the go formatter from messing up the copied block.
Indenting every line manually can be tedious. It will be nice if the extension offers a smart paste command. (credit: @aclements)

The command reads the content in the clipboard
https://code.visualstudio.com/api/references/vscode-api#Clipboard

and write indented text to the editor.

@hyangah hyangah added FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. labels Sep 27, 2024
@gopherbot gopherbot added this to the Untriaged milestone Sep 27, 2024
@hyangah hyangah modified the milestones: Untriaged, vscode-go/unplanned Oct 3, 2024
@shashank-priyadarshi
Copy link

@hyangah can I please take this up?

@hyangah
Copy link
Contributor Author

hyangah commented Oct 10, 2024

@shashank-priyadarshi Sure! Thanks. The code is under extension/src. Start from how other commands are registered in goMain.ts (the extension's entry point).
Contribution guide - https://github.com/golang/vscode-go/blob/master/docs/contributing.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Projects
None yet
Development

No branches or pull requests

3 participants