kevinhwang91 / rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
BSD 3-Clause "New" or "Revised" License
804 stars 17 forks source link

Specify directory to open #94

Closed lcrockett closed 2 years ago

lcrockett commented 2 years ago

Is your feature request related to a problem? Please describe. It is not related to a problem.

Describe the solution you'd like It would be a great enhancement if it would be possible to specify a directory to open with Ranger. For instance with RnvimrToggle ~/directory/name/bla, or with a different (new) command if it is not feasible to expand the RnvimrToggle command.

Describe alternatives you've considered Bookmarks within Ranger can be used to use keybindings navigating to specific directories, however this increases the amount of keystrokes necessary.

Additional context Cheers on the great plugin

kevinhwang91 commented 2 years ago

Make rnvimr become a file explorer let g:rnvimr_enable_ex = 1 and then e your_directory will toggle rnvimr under your_directory.

lcrockett commented 2 years ago

Thanks for that, I did try that option and it works. However, i'm already using nvim-tree.luawhich disables + hijacks netrw. In addition to that using rnvimr_enable_ex will change the current working directory within Neovim which have all sorts of implications for plugins used. For example, folke/todo-comments.nvim relies on the appropriate working directory set to show todo's.

Your answer is much appreciated but it won't solve the original feature request while ensuring other plugins / functionality are not impacted. I'm happy to try and poke around if you can point me to the appropriate place.

kevinhwang91 commented 2 years ago

addition to that using rnvimr_enable_ex will change the current working directory within Neovim which have all sorts of implications for plugins used.

Actually, rnvimr didn't change any current working directory, please check out your other plugins.

lcrockett commented 2 years ago

It's not necessarily rnvimr that changes the current working directory. It's the use of the e <directory> approach that changes it.

kevinhwang91 commented 2 years ago

Is call rnvimr#open('you_path') the feature you want?

lcrockett commented 2 years ago

Fantastic, that works as intended, cheers ! -> (call rnvimr#open($HOME . '/.local/share/notes')