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

configure neotest adapter to pass test args #445

Open
bushuyev opened this issue Jul 6, 2024 · 3 comments
Open

configure neotest adapter to pass test args #445

bushuyev opened this issue Jul 6, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@bushuyev
Copy link

bushuyev commented Jul 6, 2024

Feature description

more of a question than a feature request, is it possible to pass --show-output/--no-capture to cargo/nextest somehow like in https://github.com/rouge8/neotest-rust or get tests output in an other way?

@bushuyev bushuyev added the enhancement New feature or request label Jul 6, 2024
@mrcjkb
Copy link
Owner

mrcjkb commented Jul 6, 2024

Hey 👋

That's currently not supported in the neotest adapter configuration, but it could be implemented.
I would probably make it part of the vim.g.rustaceanvim config to support .exrc.

For now, it is possible to pass args to the RustLsp runnables command, which will default to using neotest if it's configured.

@bushuyev
Copy link
Author

bushuyev commented Jul 6, 2024

tried


        vim.keymap.set("n", "<leader>mT", function()
          vim.cmd.RustLsp("runnables", "--no-capture")
        end, { desc = "My Rust Runnables", buffer = bufnr })

and got

failed to parse test binary arguments --no-capture: arguments are unsupported

but anyway, running it from console should be good enough for now :)

Thank you for quick reply!

@bushuyev bushuyev closed this as completed Jul 6, 2024
@mrcjkb mrcjkb reopened this Jul 6, 2024
@mrcjkb
Copy link
Owner

mrcjkb commented Jul 6, 2024

I'll reopen this, as configuring the neotest adapter with args could be useful.

failed to parse test binary arguments --no-capture: arguments are unsupported

You probably need cargo-nextest for that.
Edit: Oh wait IIRC the RustLsp runnables {args} are passed to the executable, not the test runner.

@mrcjkb mrcjkb changed the title a way to get tests output configure neotest adapter to pass test args Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants