Skip to content

How to Enable Real-time/Streaming Output for Tests with rustaceanvim using RustLsp("run")? #758

Answered by mrcjkb
SamuelBorn asked this question in Q&A
Discussion options

You must be logged in to vote

Hey 👋

By default, cargo test captures stdout, to keep test output tidy. If you run cargo test in a terminal, you'll observe the same behaviour.
With the cargo CLI, you can disable this behaviour by passing --nocapture to the test executable: cargo test -- --nocapture.
With the :RustLsp run command, you can just append the flag:

:RustLsp run --nocapture

Or, in Lua:

vim.cmd.RustLsp { "run", "--nocapture" }

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@SamuelBorn
Comment options

@SamuelBorn
Comment options

@mrcjkb
Comment options

@SamuelBorn
Comment options

Answer selected by SamuelBorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants