mauriba / init.lua

My neovim configuration
MIT License
0 stars 0 forks source link

Enable netrw for remote files only #11

Open mauriba opened 1 day ago

mauriba commented 1 day ago

I love oil.nvim for the buffer-like editing of files and its look.

However, netrw has a powerful feature that allows you to edit remote files using a variety of protocols (including scp and ftp): https://neovim.io/doc/user/pi_netrw.html#netrw-externapp

So Oil should not be the default browser, allowing netrw to still be accessible. Then, on startup, we check if the argument provided to neovim specifies a protocol like protocol://server.tld/path/to/file. Only if not, we open Oil.