-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat(neotest): pass --color
argument to neotest adaper
#557
base: master
Are you sure you want to change the base?
Conversation
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
local filtered = vim.tbl_filter(function(v) | ||
return string.match(v, '^--color=') | ||
end, runnable.args.cargoArgs) | ||
|
||
if not vim.tbl_isempty(filtered) then | ||
-- add first occurrence of filter argument contain --color | ||
table.insert(args, filtered[0]) | ||
else | ||
-- cargo test needs to pass --color=never to the test runner too | ||
table.insert(args, '--color=never') | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local filtered = vim.tbl_filter(function(v) | |
return string.match(v, '^--color=') | |
end, runnable.args.cargoArgs) | |
if not vim.tbl_isempty(filtered) then | |
-- add first occurrence of filter argument contain --color | |
table.insert(args, filtered[0]) | |
else | |
-- cargo test needs to pass --color=never to the test runner too | |
table.insert(args, '--color=never') | |
end | |
---@type string | nil | |
local color_arg = vim.iter(runnable.args.cargoArgs):find(function(arg) | |
return string.match(arg, '^--color=') ~= nil | |
end) | |
if color_arg then | |
table.insert(args, color_arg) | |
else | |
-- cargo test needs to pass --color=never to the test runner too | |
table.insert(args, '--color=never') | |
end |
Yep, |
--color
argument to neotest adaper
Address issue #554
Open Questions / Remarks