Skip to content

Commit

Permalink
feat(neotest): allow adapter names as a list
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 27, 2023
1 parent 2c89770 commit 98e2ffc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/lazyvim/plugins/extras/test/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ return {
"nvim-neotest/neotest",
opts = {
-- Can be a list of adapters like what neotest expects,
-- or a list of adapter names,
-- or a table of adapter names, mapped to adapter configs.
-- The adapter will then be automatically loaded with the config.
adapters = {},
Expand Down Expand Up @@ -47,6 +48,9 @@ return {
local adapters = {}
for name, config in pairs(opts.adapters or {}) do
if type(name) == "number" then
if type(config) == "string" then
config = require(config)
end
adapters[#adapters + 1] = config
elseif config ~= false then
local adapter = require(name)
Expand Down

0 comments on commit 98e2ffc

Please sign in to comment.