all repos

init.lua @ b8903ec

my nvim config

init.lua/lua/plugins/neotest.lua(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
local map = require("core.utils").smap
return {
  "nvim-neotest/neotest",
  keys = {
    { "<leader>tn", map("neotest", "run.run") },
    { "<leader>ta", map("neotest", "run.attach") },
    { "<leader>ts", map("neotest", "summary.toggle") },
    { "<leader>tS", map("neotest", "run.stop") },
    { "<leader>to", map("neotest", "output.open") },
    { "<leader>tO", map("neotest", "output_panel.toggle") },
    { "<leader>tww", map("neotest", "watch.watch") },
    { "<leader>tws", map("neotest", "watch.stop") },
    { "<leader>twt", map("neotest", "watch.toggle") },
    { "]t", map("neotest", "jump.next") },
    { "[t", map("neotest", "jump.prev") },
    { "]T", map("neotest", "jump.next", "{status = 'failed'}") },
    { "[T", map("neotest", "jump.prev", "{status = 'failed'}") },
    { "<leader>td", map("neotest", "run.run", "{strategy = 'dap'}") },
    {
      "<leader>tt",
      function()
        require("neotest").run.run(vim.fn.expand "%")
      end,
    },
  },
  dependencies = {
    "nvim-neotest/neotest-go",
    "nvim-neotest/neotest-plenary",
  },
  config = function()
    require("neotest").setup {
      adapters = {
        require "neotest-go" { experimental = { test_table = true } },
        require "neotest-plenary",
      },
      icons = {
        expanded = "",
        child_prefix = "",
        child_indent = "",
        final_child_prefix = "",
        non_collapsible = "",
        collapsed = "",
        passed = "",
        running = "",
        failed = "",
        unknown = "",
      },
      summary = {
        mappings = {
          expand = { "l", "h", "<CR>" },
          stop = "s",
        },
      },
    }
  end,
}