Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using lazy #157

Open
iomari opened this issue Feb 9, 2024 · 2 comments
Open

using lazy #157

iomari opened this issue Feb 9, 2024 · 2 comments

Comments

@iomari
Copy link

iomari commented Feb 9, 2024

can you show me the advanced config using lazy?

@shiro
Copy link

shiro commented Mar 3, 2024

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,
	},

@ChrisTaylorDeveloper
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants