Skip to content

Commit

Permalink
fix(testables): default to termopen test executor if not using neotest
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jun 21, 2024
1 parent 14a5a4b commit 7435535
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lua/rustaceanvim/config/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,13 @@ local function load_dap_configuration(type)
return dap_config
end

---@return RustaceanExecutor
local function get_crate_test_executor()
if vim.fn.has('nvim-0.10.0') == 1 then
return executors.background
else
return executors.termopen
end
end

---@return RustaceanExecutor
local function get_test_executor()
if package.loaded['rustaceanvim.neotest'] ~= nil then
-- neotest has been set up with rustaceanvim as an adapter
return executors.neotest
end
return get_crate_test_executor()
return executors.termopen
end

---@class RustaceanConfig
Expand All @@ -98,7 +89,7 @@ local RustaceanDefaultConfig = {
test_executor = get_test_executor(),

---@type RustaceanExecutor
crate_test_executor = get_crate_test_executor(),
crate_test_executor = executors.termopen,

---@type string | nil
cargo_override = nil,
Expand Down

0 comments on commit 7435535

Please sign in to comment.