rnvimr
rnvimr copied to clipboard
using lazy
can you show me the advanced config using lazy?
You can use mine as a reference, it gets lazy loaded once you hit the key-combo:
{
"kevinhwang91/rnvimr",
keys = { { "<leader>l", "" } },
init = function()
vim.g.rnvimr_draw_border = 0
vim.g.rnvimr_layout = {
relative = "editor",
width = vim.fn.winwidth(0),
height = vim.fn.winheight(0) / 2,
col = 0,
row = vim.fn.winheight(0) / 4,
style = "minimal",
}
vim.g.rnvimr_ranger_cmd = {
"ranger",
"--cmd=set preview_directories false",
"--cmd=set column_ratios 2,5,0",
"--cmd=set preview_files false",
"--cmd=set preview_images truefalse",
"--cmd=set padding_right false",
"--cmd=set collapse_preview true",
}
end,
config = function()
vim.keymap.set("n", "<leader>l", function()
vim.api.nvim_command("RnvimrToggle")
end, {})
end,
},
This is my config:
{
'kevinhwang91/rnvimr',
config = function()
vim.keymap.set('n', '<leader>l', function()
vim.api.nvim_command 'RnvimrToggle'
end, {})
end,
},
Leader plus l opens ranger but when I press leader plus l again, nothing happens, the window does not hide. Any suggestions please? The space key seems to be captured by Ranger first i.e the cursor moves to the next line down.