From f6e377fcfed932b71456a0b0780c1f5ed22cabd4 Mon Sep 17 00:00:00 2001 From: Jonathan Raines Date: Tue, 6 Jul 2021 12:40:10 -0500 Subject: Replace LazyGit Plugin with FTerm Instance (#717) * Replace LazyGit Plugin with FTerm Instance * Added gg keybind to FTerm LazyGit * Added check to see if lazygit is installed * Changed lazyload event to prevent error when called from dashboard on startup * Removed lazygit plugin. Changed Fterm lazy loading * Made the executable check more universal for when we include other terminal applications Co-authored-by: rebuilt --- lua/lv-which-key/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua/lv-which-key') diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua index 5fb3c92d..a14a82b6 100644 --- a/lua/lv-which-key/init.lua +++ b/lua/lv-which-key/init.lua @@ -263,8 +263,12 @@ if O.plugin.zen.active then vim.api.nvim_set_keymap("n", "z", ":ZenMode", { noremap = true, silent = true }) mappings["z"] = "Zen" end -if O.plugin.lazygit.active then - vim.api.nvim_set_keymap("n", "gg", ":LazyGit", { noremap = true, silent = true }) +if O.plugin.floatterm.active then + vim.api.nvim_set_keymap("n", "gg", "lua _G.__fterm_lazygit()", { noremap = true, silent = true }) + vim.api.nvim_set_keymap("n", "", "lua require('FTerm').toggle()", { noremap = true, silent = true }) + vim.api.nvim_set_keymap("t", "", "lua require('FTerm').toggle()", { noremap = true, silent = true }) + vim.api.nvim_set_keymap("n", "", "lua _G.__fterm_lazygit()", { noremap = true, silent = true }) + vim.api.nvim_set_keymap("t", "", "lua _G.__fterm_lazygit()", { noremap = true, silent = true }) mappings["gg"] = "LazyGit" end if O.plugin.telescope_project.active then -- cgit v1.2.3