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

Nvim Tree prevents gx mapping working #22

Closed
akinsho opened this issue May 28, 2020 · 3 comments · Fixed by #14
Closed

Nvim Tree prevents gx mapping working #22

akinsho opened this issue May 28, 2020 · 3 comments · Fixed by #14

Comments

@akinsho
Copy link
Contributor

akinsho commented May 28, 2020

It seems like g:loaded_netrw is being set by nvim-tree at some point, which I probably wouldn't have noticed if not for the fact that I use gx often to follow links in nvim. I know Netrw interferes with other alternative tree plugins as this has been something I've seen across several plugins. But is it possible to avoid disabling it altogether or at least maintaining the gx behaviour. Maybe a replacement mapping to gx that calls loads netrw only for that purpose.

Not entirely sure how that would work tbh

@kyazdani42
Copy link
Member

well leaving netrw would obviously conflict with nvim tree.
I think it wouldn't be very difficult to make that feature actually, it would take ~10 LOC

@kyazdani42
Copy link
Member

The refactoring is almost done, is still have 2/3 quircks to fix but it should come soon, i'll add this in it.

@joshpetit
Copy link

joshpetit commented Nov 25, 2021

I'm not sure if this is related, but I can't use gx to open links. I have this as my config:

    use {
        'kyazdani42/nvim-tree.lua',
        requires = 'kyazdani42/nvim-web-devicons',
        config = function()
            require'nvim-tree'.setup {
                disable_netrw = true,
                hijack_netrw = false
            }
        end
    }

and have tried both of them set to false, but I still receive this error:

E117: Unknown function: netrw#GX
E116: Invalid arguments for function netrw#BrowseX

Any ideas? I'd appreciate it thanks!

Update: Just realized that since I put the config option inside of the use function I have to recompile pcaker everytime I change the options. I moved it and that fixed it. Thank you!

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

Successfully merging a pull request may close this issue.

3 participants