nvim: run neotest when not in a java test
This commit is contained in:
parent
6c010a9f42
commit
645a50974b
|
@ -15,6 +15,7 @@ local harpoon_mark = require('harpoon.mark')
|
|||
local harpoon_ui = require('harpoon.ui')
|
||||
local baleia = require('baleia').setup {}
|
||||
local theme = require("nise.theme")
|
||||
local neotest = require("neotest")
|
||||
|
||||
which_key.setup {
|
||||
window = {
|
||||
|
@ -121,12 +122,22 @@ which_key.register({
|
|||
d = {
|
||||
name = 'Debug',
|
||||
m = { function()
|
||||
jdtls.test_nearest_method()
|
||||
dap.repl.open({ width = 60 }, 'vsplit')
|
||||
if vim.bo.filetype == 'java' then
|
||||
jdtls.test_nearest_method()
|
||||
dap.repl.open({ width = 60 }, 'vsplit')
|
||||
else
|
||||
neotest.run.run({ strategy = "dap" })
|
||||
neotest.summary.open()
|
||||
end
|
||||
end, "Test nearest method" },
|
||||
c = { function()
|
||||
jdtls.test_class()
|
||||
dap.repl.open({ width = 60 }, 'vsplit')
|
||||
if vim.bo.filetype == 'java' then
|
||||
jdtls.test_class()
|
||||
dap.repl.open({ width = 60 }, 'vsplit')
|
||||
else
|
||||
neotest.run.run(vim.fn.expand("%"))
|
||||
neotest.summary.open()
|
||||
end
|
||||
end, "Test class" },
|
||||
b = { dap.toggle_breakpoint, "Toggle breakpoint" },
|
||||
r = { dap.repl.open, "Open repl" },
|
||||
|
|
Loading…
Reference in New Issue