From 4b4083656b2cdd003c6b04c470c3e859075e8ca3 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 16 Feb 2023 11:58:45 +0000 Subject: [PATCH] Add keymap and config for nvim-test --- config/nvim/lua/config/neotree.lua | 6 ------ config/nvim/lua/config/nvim-test.lua | 6 ++++++ config/nvim/lua/keymaps.lua | 10 ++++++++++ config/nvim/lua/plugins.lua | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 config/nvim/lua/config/nvim-test.lua diff --git a/config/nvim/lua/config/neotree.lua b/config/nvim/lua/config/neotree.lua index 1dfc5fef..5355d014 100644 --- a/config/nvim/lua/config/neotree.lua +++ b/config/nvim/lua/config/neotree.lua @@ -1,13 +1,7 @@ vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) require("neo-tree").setup({ close_if_last_window = true, - window = { - mapping = { - ["Z"] = "expand_all_nodes", - }, - }, filesystem = { - follow_current_file = true, group_empty_dirs = true, }, buffers = { diff --git a/config/nvim/lua/config/nvim-test.lua b/config/nvim/lua/config/nvim-test.lua new file mode 100644 index 00000000..81ca45a6 --- /dev/null +++ b/config/nvim/lua/config/nvim-test.lua @@ -0,0 +1,6 @@ +require("nvim-test").setup({ + termOpts = { + direction = "horizontal", + keep_one = true, + }, +}) diff --git a/config/nvim/lua/keymaps.lua b/config/nvim/lua/keymaps.lua index 3eb483bc..e99b1443 100644 --- a/config/nvim/lua/keymaps.lua +++ b/config/nvim/lua/keymaps.lua @@ -19,6 +19,7 @@ vim.keymap.set("n", "fz", "Telescope current_buffer_fuzzy_find" -- Neotree vim.keymap.set("n", "n", "Neotree toggle") +vim.keymap.set("n", "\\", "Neotree reveal") -- Trouble vim.keymap.set("n", "xx", "TroubleToggle") @@ -26,3 +27,12 @@ vim.keymap.set("n", "xw", "TroubleToggle workspace_diagnostics" vim.keymap.set("n", "xd", "TroubleToggle document_diagnostics") vim.keymap.set("n", "xq", "TroubleToggle quickfix") vim.keymap.set("n", "xl", "TroubleToggle loclist") + +-- nvim-test +vim.keymap.set("n", "ts", "TestSuite") +vim.keymap.set("n", "tf", "TestFile") +vim.keymap.set("n", "te", "TestEdit") +vim.keymap.set("n", "tn", "TestNearest") +vim.keymap.set("n", "tl", "TestLast") +vim.keymap.set("n", "tv", "TestVisit") +vim.keymap.set("n", "ti", "TestInfo") diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index a6515d45..b82d9ddc 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -119,7 +119,7 @@ require("packer").startup({ use({ "klen/nvim-test", config = function() - require("nvim-test").setup() + require("config.nvim-test") end, }) end,