From bee22bce92e39a6c04956c4d47a43524b37bf21f Mon Sep 17 00:00:00 2001 From: spring Date: Sun, 16 Oct 2022 16:31:30 +0800 Subject: [PATCH] Use vim-test instead of abagile test --- init.lua | 13 ++++++++++--- lua/config/plugins.lua | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index b31b323..fd69693 100644 --- a/init.lua +++ b/init.lua @@ -332,10 +332,17 @@ keymap('x', 'ih', ':Gitsigns select_hunk', opts) -- Abagile vim keymap("n", "", ":call abagile#whitespace#strip_trailing()", opts) -keymap("n", "tl", ":call abagile#rails#test_tmux('h')", opts) -keymap("n", "tf", ":call abagile#rails#test_tmux('h', 1)", opts) - keymap("n", "]", ":Vista", opts) -- Spectre, search and replace keymap("v", "fc", "lua require('spectre').open_visual()", opts) + +-- Running tests +vim.g['abagile_rails_test_runner'] = 0 +vim.g['test#strategy'] = 'vtr' +vim.g['test#runner_commands'] = { 'Minitest', 'Rails' } + +keymap("n", "tl", "TestLast", opts) +keymap("n", "tf", "TestFile", opts) +keymap("n", "tn", "TestNearest", opts) +keymap("n", "tg", "TestVisit", opts) diff --git a/lua/config/plugins.lua b/lua/config/plugins.lua index bfa178f..c02dfad 100644 --- a/lua/config/plugins.lua +++ b/lua/config/plugins.lua @@ -161,6 +161,10 @@ return packer.startup(function() use 'Olical/conjure' use 'clojure-vim/vim-jack-in' + + -- Running Tests + use 'vim-test/vim-test' + -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins if PACKER_BOOTSTRAP then