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

Request for support with VSCode configuration #147

Open
Olshansk opened this issue Dec 12, 2023 · 2 comments
Open

Request for support with VSCode configuration #147

Olshansk opened this issue Dec 12, 2023 · 2 comments

Comments

@Olshansk
Copy link

Has anyone been able to successfully configure vscode to use goimports-reviser?

I've tried both of the solutions below, but neither one does anything: no error, no changes, etc... Manually running attempt #2 from my CLI verifies that the binary is properly installed, but the goal is to have it be part of my IDE.

Attempt 1

  "go.alternateTools": {
    "customFormatter": "goimports-reviser"
  },

Attempt 2

  "go.alternateTools": {
    "customFormatter": "/Users/olshansky/workspace/configs/pocket/poktroll/vscode/goimports-reviser.sh",
  },

Where /Users/olshansky/workspace/configs/pocket/poktroll/vscode/goimports-reviser.sh is:

/Users/olshansky/go/bin/goimports-reviser -rm-unused -set-alias -format -output write "$@"

Meta Request: Please no suggestions to use a different editor.

@Olshansk
Copy link
Author

Still doesn't work with the vscode lps or configs, so I have to use the filewatcher command instead:

  "filewatcher.commands": [
    {
      "match": "\\.go*",
      "isAsync": true,
      "cmd": "/Users/olshansky/go/bin/goimports-reviser -rm-unused -set-alias -format -output write ${file}",
      "event": "onFileChange"
    }
  ],

@e365367
Copy link

e365367 commented May 24, 2024

can you use it with vscode now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants