Add ranger terminal shortcut

This commit is contained in:
Edward Litherland-Smith 2022-10-04 13:50:05 +01:00
parent 510edddbed
commit 4d9940640f

View file

@ -28,15 +28,21 @@ require('toggleterm').setup{
}
local Terminal = require('toggleterm.terminal').Terminal
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true, direction = 'float' })
local ranger = Terminal:new({ cmd = "ranger", hidden = true, direction = 'float' })
function _lazygit_toggle()
lazygit:toggle()
end
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
function _ranger_toggle()
ranger:toggle()
end
-- aerial telescope integration
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>r", "<cmd>lua _ranger_toggle()<CR>", {noremap = true, silent = true})
-- load telescope integrations
require('telescope').load_extension('aerial')
require('telescope').load_extension('notify')