Error update_focused_file
Last commit b991a2ac482a31b9de7ca6b49d050b2076c1f96e introduced this error:
E5108: Error executing lua ...vim/site/pack/packer/opt/nvim-tree.lua/lua/nvim-tree.lua:327: attempt to index field 'update_focused_file' (a nil value)
stack traceback:
...vim/site/pack/packer/opt/nvim-tree.lua/lua/nvim-tree.lua:327: in function 'change_dir'
...project.nvim/lua/telescope/_extensions/project/utils.lua:122: in function 'open_in_nvim_tree'
...project.nvim/lua/telescope/_extensions/project/utils.lua:131: in function 'change_project_dir'
...oject.nvim/lua/telescope/_extensions/project/actions.lua:103: in function 'run_replace_or_original'
...k/packer/opt/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'find_project_files'
...-project.nvim/lua/telescope/_extensions/project/main.lua:80: in function 'run_replace_or_original'
...k/packer/opt/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
...ack/packer/opt/telescope.nvim/lua/telescope/mappings.lua:341: in function 'execute_keymap'
[string ":lua"]:1: in main chunk
This happens when nvimtree is closed and does not happen when nvimtree is open.
Is nvim-tree.lua the latest version? I didn't encounter this problem.
I can't reproduce the bug. It's working for me in the latest versions.
I will debug it later.
@tiagovla try reinstall plugin
@tiagovla try reinstall plugin
Sorry, I forgot to update this. The problem was that I'm lazyloading nvim-tree and this plugin calls it before it is loaded.
I'm really not sure why opening nvim-tree is the default behavior. A better solution IMO would be to emit an event and let the user decide if he/she wants to do something about it instead of introducing dependencies or forcing anything. Could this at least be optional?
@tiagovla agreed. If you would like to submit a PR to fix this I'd be happy to approve
I'm really not sure why opening
nvim-treeis the default behavior. A better solution IMO would be to emit an event and let the user decide if he/she wants to do something about it instead of introducing dependencies or forcing anything. Could this at least be optional?
It's done optional for the moment in latest PR