-
Notifications
You must be signed in to change notification settings - Fork 65
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
netrw instead of dirvish with nvim invocation on directory (could be plugin manager issue) #213
Comments
Facing the same issue, did you find a solution @sbeyer ? |
No, I haven't currently looked into it further although it bothers me on a daily basis. Which package manager do you use? |
If you're in the lua ecosystem with packer and such, I recommend If you're going to try it, you can safe some time with this config, which took a bit of research for me. If you're getting a netrw error on start, you need to place the netrw settings somewhere where it's loaded first. local actions = require'lir.actions'
local clipboard_actions = require'lir.clipboard.actions'
local map = vim.api.nvim_set_keymap
-- Disable netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Open lir like netrw with vinegar or dirvish
map( 'n', '-', [[<Cmd>execute 'e ' .. expand('%:p:h')<CR>]], { noremap = true })
require'lir'.setup {
show_hidden_files = true,
devicons_enable = true,
float = { winblend = 0 }, -- keep float setting even if you don't use it, otherwise it will crash
hide_cursor = false,
mappings = {
["<CR>"] = actions.edit,
["-"] = actions.up,
['<C-s>'] = actions.split,
['<C-v>'] = actions.vsplit,
['<C-t>'] = actions.tabedit,
['q'] = actions.quit,
['d'] = actions.mkdir,
['N'] = actions.newfile,
['R'] = actions.rename,
['Y'] = actions.yank_path,
['.'] = actions.toggle_show_hidden,
['D'] = actions.delete,
['C'] = clipboard_actions.copy,
['X'] = clipboard_actions.cut,
['P'] = clipboard_actions.paste,
},
} |
Disabling netrw in your config should do the trick:
|
@jonleopard Awesome! This works like a charm! I don't know if this should be documented somewhere (maybe I just missed it)... if not, this issue can be closed. edit: @Murderlon I missed those particular lines in your code snippet :/ |
This might have been a Nvim packpath bug. With packer + Nvim 0.7.2 or later, can you confirm this is fixed? |
FYI, nvim 0.8.0 + packer still has this issue. |
This ensures that I get dirvish as a file browser when I open vim on a directory path. See: justinmk/vim-dirvish#213 (comment)
Recently I observed the following behavior:
I haven't yet taken the time to fully figure out what's going on but I changed a lot in my neovim configuration recently. Most importantly, I have switched from Plug to Paq and from Paq to Packer and it seems the problem is related. I am pretty sure it all worked when I used Plug and it stopped working with Paq and Packer. I have no special configuration for dirvish, just including the package (this hasn't changed in Plug/Paq/Packer).
I am using neovim 0.5.1
The text was updated successfully, but these errors were encountered: