local neotest = require "neotest"
if vim.bo.ft == "python" then
neotest.setup { adapters = require "neotest-python" }
elseif vim.bo.ft == "go" then
neotest.setup { adapters = require "neotest-go" }
end
but does not work plus it has their own problems like there should be only one setup, thinking about the after/ftplugin directory but i feel it won't work either so i suppose, maybe can be implemented internally in neotest , probably create some table that can be passed to setup as an alternative to the adapters table to be able to lazy load by ft, something like adapters_by_ft that should look like this:
Question / Proposal:
Is there a way to lazy load the adapters based on the file type?
The problem is that all the adapters are loaded even when they are no required for the current neotest session.
The current implementation is:
I tried:
but does not work plus it has their own problems like there should be only one setup, thinking about the
after/ftplugin
directory but i feel it won't work either so i suppose, maybe can be implemented internally inneotest
, probably create some table that can be passed to setup as an alternative to theadapters
table to be able to lazy load by ft, something likeadapters_by_ft
that should look like this:I think it would be nice, maybe i will try to implement this by myself, and if it works submit a PR.