Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Apr 10, 2024
1 parent 0c8b578 commit 3052637
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 6 deletions.
1 change: 1 addition & 0 deletions lua/dotvim/pkgs/base/setup/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local uncountable_filetypes = {
["neo-tree"] = true,
["neo-tree-popup"] = true,
["NvimSeparator"] = true,
["neotest-summary"] = true,
}

function M.is_uncountable(win_id)
Expand Down
61 changes: 60 additions & 1 deletion lua/dotvim/pkgs/coding/plugins/neotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ return {
opts = {
adapters = {},
icons = {
running_animated = {"", "", "", "", "", "", "", ""},
running_animated = {
"",
"",
"",
"",
"",
"",
"",
"",
},
passed = "󰄳",
running = "󰁪",
failed = "󰅙",
Expand All @@ -27,4 +36,54 @@ return {
notify = "",
},
},
actions = function()
---@type dotvim.core
local Core = require("dotvim.core")

---@type dotvim.utils
local Utils = require("dotvim.utils")

---@type dotvim.core.action.ActionOption[]
return {
{
id = "neotest.run-suit",
title = "Run test suit",
callback = function()
require("neotest").run.run { suite = true }
end,
keys = { "<leader>ts", desc = "run-test-suit" },
},
{
id = "neotest.run-current-file",
title = "Run tests in current file",
callback = function()
require("neotest").run.run(vim.fn.expand("%"))
end,
},
{
id = "neotest.run-nearest",
title = "Run nearest test",
callback = function()
require("neotest").run.run(vim.fn.expand("%"))
end,
keys = { "<leader>tn", desc = "run-nearest-test" },
},
{
id = "neotest.rerun-last",
title = "Run nearest test",
callback = function()
require("neotest").run.run_last()
end,
keys = { "<leader>tr", desc = "rerun-last" },
},
{
id = "neotest.toggle-summary",
title = "Toggle neotest summary",
callback = function()
require("neotest").summary.toggle()
end,
keys = { "<leader>ts", desc = "neotest-summary" },
},
}
end,
}
2 changes: 1 addition & 1 deletion lua/dotvim/pkgs/editor/plugins/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ return {
["<leader>n"] = { name = "+no" },
["<leader>p"] = { name = "+preview" },
["<leader>r"] = { name = "+remote" },
["<leader>t"] = { name = "+toggle" },
["<leader>t"] = { name = "+test/toggle" },
["<leader>v"] = { name = "+vcs" },
["<leader>w"] = { name = "+window" },
["<leader>x"] = { name = "+xray" },
Expand Down
5 changes: 1 addition & 4 deletions lua/dotvim/pkgs/extra/languages/rust.lua
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,8 @@ return {
},
{
"neotest",
dependencies = {
"rouge8/neotest-rust",
},
opts = function(_, opts)
table.insert(opts.adapters, require("neotest-rust"))
table.insert(opts.adapters, require("rustaceanvim.neotest"))
end,
},
},
Expand Down

0 comments on commit 3052637

Please sign in to comment.