From aaac1f04614943dfaf90a23024d1b9b18ced9a6c Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 19 Jul 2022 23:09:41 +0200 Subject: Add more hydras --- plugin/test.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 plugin/test.lua (limited to 'plugin/test.lua') diff --git a/plugin/test.lua b/plugin/test.lua new file mode 100644 index 0000000..e48f658 --- /dev/null +++ b/plugin/test.lua @@ -0,0 +1,40 @@ +local hydra = require("hydra") + +vim.g["test#preserve_screen"] = 1 + +vim.cmd([[ + let test#php#pest#executable = 'sail test' + 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 + ^ ^ __ ^ +]] + +hydra({ + name = "vimtest", + hint = hint, + mode = "n", + config = { + color = "teal", + invoke_on_body = true, + hint = { + border = "rounded", + position = "bottom", + } + }, + body = "t", + heads = { + { "n", ":TestNearest" }, + { "f", ":TestFile" }, + { "s", ":TestSuit" }, + { "l", ":TestLast" }, + { "g", ":TestVisit" }, + { '', nil, { exit = true } } + } +}) -- cgit v1.2.3