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

Provide a way to run alternate command for eg. go and go test #471

Open
skalle opened this issue Jun 4, 2024 · 2 comments
Open

Provide a way to run alternate command for eg. go and go test #471

skalle opened this issue Jun 4, 2024 · 2 comments

Comments

@skalle
Copy link

skalle commented Jun 4, 2024

I'm using bazel.io for a Go project which gives that you usually want to wrap go commands in something like:

$ bazel run @rules_go/go -- mod tidy

It'd be great to be able to provide an alternate go command used in go.nvim.

@ray-x
Copy link
Owner

ray-x commented Jun 4, 2024

There is a setting go = 'go', -- set to go1.18beta1 if necessary
You may want to do this go = 'bazel',

But, ATM the command have to be fully compatible with go

@skalle
Copy link
Author

skalle commented Jun 5, 2024

Hey @ray-x .

I tried that but got errors: unknown option run

This with the following configuration:

      require('go').setup {
        disable_defaults = false,
        luasnip = true,
        go = 'bazel run @rules_go//go --',
     }

bazel will run the go command so whatever is after the -- will be working the same as vanilla go

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