nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues Following 7495975 feat: automated migration from view.mappings.list to on_attach

kola-web opened this issue · comments

Description

update to latest version

Neovim version

NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
编译者 brew@Ventura-arm64.local

Features: +acl +iconv +tui
See ":help feature-compile"

     系统 vimrc 文件: "$VIM/sysinit.vim"
         $VIM 预设值: "/opt/homebrew/Cellar/neovim/0.8.3/share/nvim"

Run :checkhealth for more info

Operating system and version

mac

nvim-tree version

7495975

Minimal config

any

Steps to reproduce

Update the plugin to reappear

Expected behavior

No response

Actual behavior

No response

I faced the same problem this morning. Seems like neovim doesn't recognize the whole Plugin anymore.

This will help until the bug is fixed:

Plug 'nvim-tree/nvim-tree.lua', { 'commit': '9c97e6449b0b0269bd44e1fd4857184dfa57bb4c'}

The same problem

+1 same issue

may be It is relection,
I try type 'g?' for see help but error
after update have issue.

image
E5108: Error executing lua: ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/help.lua:29: attempt to index local 'desc' (a nil value) stack traceback: ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/help.lua:29: in function 'tidy_desc' ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/help.lua:69: in function <...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/help.lua:68> vim/shared.lua: in function 'tbl_map' ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/help.lua:68: in function 'compute_lines' ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/init.lua:66: in function 'draw' ...ree.lua/lua/nvim-tree/actions/tree-modifiers/toggles.lua:35: in function <...ree.lua/lua/nvim-tree/actions/tree-modifiers/toggles.lua:33>

This will help until the bug is fixed:

Plug 'nvim-tree/nvim-tree.lua', { 'commit': '9c97e6449b0b0269bd44e1fd4857184dfa57bb4c'}

It is work for me, that commit is HEAD^

may be It is relection,
I try type 'g?' for see help but error
after update have issue.

Fixed. The "no mapping description" case wasn't handled.

Please reply if you have any further issues; are there any messages or errors when starting?

@alex-courtis For me works ok.
Thank you Great Job.

I still have an issue, which seems still the same issue:

image

My config is here: https://github.com/svanharmelen/dotfiles/blob/master/nvim/lua/plugins/nvim-tree.lua

I still have an issue, which seems still the same issue:

Thank you for the details. I'll get right on that in the morning.

This will help until the bug is fixed:

Plug 'nvim-tree/nvim-tree.lua', { 'commit': '9c97e6449b0b0269bd44e1fd4857184dfa57bb4c'}

+1 Similar issue where neovim doesn't seem to recognize the plugin anymore but this fixes it temporarily.

https://github.com/svanharmelen/dotfiles/blob/master/nvim/lua/plugins/nvim-tree.lua#L9

nvim_tree_callback was removed following deprecation ~1 year ago.

As it is still in use it will be restored, although it will take some time to write a backwards compatibility shim.

A proper migration (with notification and mechanism) will be developed afterwards.

Ah... Check! So is there an alternative for the callback that I could/should use?

Then I'll update my config...

Ah... Check! So is there an alternative for the callback that I could/should use?

Then I'll update my config...

Remove cb and use action = "dir_up"

Thanks for the pointer, will have a look tomorrow morning.

And thanks for your efforts on this plugin, much appeciated!

nvim_tree_callback has been restored, view.mappings.list..cb should now function as before.

Please visit wiki: Migrating To on_attach to generate an on_attach for your existing mappings.

Updated my config, so I'm all good again... 👍🏻

It seems that inserting

require('nvim-tree.keymap').default_on_attach(bufnr)

on the top of custom on_attach body can be enough to restore all default mappings lost after the change. It would be better way instead of generating all mappings assuming that we can rely on it (and having to regenerate them sometimes). What do you think @alex-courtis?

Edit: I overlooked that regeneration can concern old-way mappings only.

What do you think @alex-courtis?

We'll get back to you...

@przepompownia see :help nvim-tree.api.config.mappings.default_on_attach()

Alternative Default Mappings

Thanks, I see that the method I used previously is now available from nvim-tree.api 👍

We have stability.