From 98e2ffcf14bb5f336ee2e4679d2b7d5699486bcc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 27 May 2023 09:36:52 +0200 Subject: [PATCH] feat(neotest): allow adapter names as a list --- lua/lazyvim/plugins/extras/test/core.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/extras/test/core.lua b/lua/lazyvim/plugins/extras/test/core.lua index 3d2bbe82..28797a2c 100644 --- a/lua/lazyvim/plugins/extras/test/core.lua +++ b/lua/lazyvim/plugins/extras/test/core.lua @@ -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 = {}, @@ -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)