aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/test.lua
blob: 2ba25dd0b2b286701b8b00e5dbab4c159d86e084 (plain)
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
local hydra = require("hydra")

vim.g["test#preserve_screen"] = 1

vim.cmd([[
    let test#strategy = 'neovim'
    let test#neovim#term_position = 'vert'
    let g:test#preserve_screen = 1
]])

local hint = [[
 Vim Tests
 _n_: Near test  _f_: Current file   _s_: Test Suit ^
 _l_: Test Last  _g_: Visit
 ^ ^                                          _<Esc>_ ^
]]

hydra({
    name = "vimtest",
    hint = hint,
    mode = "n",
    config = {
        color = "teal",
        invoke_on_body = true,
        hint = {
            border = "rounded",
            position = "bottom",
        }
    },
    body = "<leader>t",
    heads = {
        { "n", ":TestNearest<CR>" },
        { "f", ":TestFile<CR>" },
        { "s", ":TestSuit<CR>" },
        { "l", ":TestLast<CR>" },
        { "g", ":TestVisit<CR>" },
        { '<Esc>', nil, { exit = true } }
    }
})