From ea0f4bf8ffade657b1d45152dbc183d4679e75c4 Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Fri, 12 Jul 2024 11:18:14 -0300 Subject: Feat: PI --- lua/alpha/test_menu.lua | 50 ------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 lua/alpha/test_menu.lua (limited to 'lua/alpha/test_menu.lua') diff --git a/lua/alpha/test_menu.lua b/lua/alpha/test_menu.lua deleted file mode 100644 index afe3a9e..0000000 --- a/lua/alpha/test_menu.lua +++ /dev/null @@ -1,50 +0,0 @@ -local hydra = require "hydra" - -local hint = [[ - Vim Tests - _n_: Near test _h_: Harpoon ^ - _f_: Current file _s_: Test Suit ^ - _l_: Test Last _g_: Visit - _w_: Watch last Test _p_: stop watch - ^ ^ __ ^ -]] -local auto_cmd_id = nil -local stopAutoCommand = function() - if auto_cmd_id ~= nil then - vim.api.nvim_del_autocmd(auto_cmd_id) - auto_cmd_id = nil - end -end -local startAutoCommand = function() - stopAutoCommand() - auto_cmd_id = vim.api.nvim_create_autocmd({ "BufWritePost" }, { - pattern = { "*.php", "*.feature", "*.yaml" }, - command = "TestLast", - }) -end - -hydra { - name = "vimtest", - hint = hint, - mode = "n", - config = { - color = "teal", - invoke_on_body = true, - hint = { - border = "rounded", - position = "bottom", - }, - }, - body = "t", - heads = { - { "n", ":TestNearest" }, - { "h", ":TestNearest -strategy=harpoon" }, - { "f", ":TestFile" }, - { "s", ":TestSuit" }, - { "l", ":TestLast" }, - { "g", ":TestVisit" }, - { "w", startAutoCommand }, - { "p", stopAutoCommand }, - { "", nil, { exit = true } }, - }, -} -- cgit v1.2.3