fix(neotest): properly detect __call. Fixes #847
This commit is contained in:
1 file changed
+2
-1
@@ -57,9 +57,10 @@ return {
|
||||
elseif config ~= false then
|
||||
local adapter = require(name)
|
||||
if type(config) == "table" and not vim.tbl_isempty(config) then
|
||||
local meta = getmetatable(adapter)
|
||||
if adapter.setup then
|
||||
adapter.setup(config)
|
||||
elseif adapter.__call then
|
||||
elseif meta and meta.__call then
|
||||
adapter(config)
|
||||
else
|
||||
error("Adapter " .. name .. " does not support setup")
|
||||
|
||||
Reference in new issue
Block a user