Add ranger terminal shortcut
This commit is contained in:
parent
510edddbed
commit
4d9940640f
12
init.lua
12
init.lua
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in a new issue