New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tests): adds test management #642
Conversation
|
I am unsure of the impact - decided to not add it as I do not understand it fully. |
@folke What do you think about this? Do you prefer me opening an Idea in discussions? |
I would love to have this tbh! Something else i would add to the default configuration is neotest as it's a best effort plugin to run test automatically. see my config for neotest https://github.com/kevinrobayna/dotfiles/blob/c699b32f7493e0caf44dc94db738447fd41b03f9/config/.config/nvim/lua/plugins/neotest.lua
Although i think is also makes sense to leave it to the consumer so that they do something like this
|
I would personally prefer not to have I am not sure how this relates to auto running tests - unless |
Sorry for the delay. Will have a look into this tomorrow! |
Yeah I think the default configuration should be as minimal as possible to be honest |
I recently expedited some effort in setting up neotest with language plugins broken up into language layers:
Since the language extras in my configuration are dependent on the Neotest extra, I had to use a hack to install neotest plugins only if it is already enabled. I believe this is an issue we want resolved for Lazyvim's official neotest layer too so its something I'd like us to consider a potentially better solution for. |
Why do you want |
I'm fine either way wrt vim-test. My concern is having a clean way to enable neotest adaptors for imported language layers. Although one clear advantage to vim-test is having neotest ready to go for any language/framework OOTB, some for which native adaptors don't exist at all. |
@folke Did you have time to give feedback here? 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Let me know when it's ready to merge |
Just copied into my personal config and it works as expected. {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/neotest-go",
},
opts = function(_, opts)
opts.adapters = vim.list_extend(opts.adapters or {}, {
require("neotest-go")({
args = { "-tags=integration" },
}),
})
end,
}, |
Looks good. I don't really use neotest myself, but may give it a try :) |
Merged. Thanks! |
* feat(tests): adds test management * refactor(tests): pr changes * fix(tests): make dap keybind optional based on nvim-dap existence
* feat(tests): adds test management * refactor(tests): pr changes * fix(tests): make dap keybind optional based on nvim-dap existence
Adds neotest setup based on my very early understanding of neotest.
We can then add test adapters in the following way.
Can we somehow only add the "Debug Nearest" keybind if
nvim-dap
exists?