attempt to call field 'file_browser' (a nil value)
Hey @ahmedkhalf,
Thanks for developing project.nvim it is one of my favourite Neovim plugins. I just attempted to try out the shortcut for browsing a project's files but got hit with the following:
E5108: Error executing lua ...tart/project.nvim/lua/telescope/_extensions/projects.lua:97: attempt to call field 'file_browser' (a nil value)
stack traceback:
...tart/project.nvim/lua/telescope/_extensions/projects.lua:97: in function 'key_func'
...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:242: in function 'execute_keymap'
[string ":lua"]:1: in main chunk
Is there a dependency that is required for the file_browser?
My Neovim config is at https://github.com/alanjjenkins/chezmoi-dotfiles/tree/master/private_dot_config/nvim if you want to look at it.
Thanks,
Alan Jenkins
I've installed nvim-telescope/telescope-file-browser.nvim and enabled it with telescope.load_extension("file_browser") but I still have the following error:
E5108: Error executing lua ...tart/project.nvim/lua/telescope/_extensions/projects.lua:97: attempt to c
all field 'file_browser' (a nil value)
stack traceback:
...tart/project.nvim/lua/telescope/_extensions/projects.lua:97: in function 'key_func'
...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:242: in function 'execute_keymap'
[string ":lua"]:1: in main chunk
So I looked into the code:
local function browse_project_files(prompt_bufnr)
local project_path, cd_successful = change_working_directory(prompt_bufnr, true)
local opt = {
cwd = project_path,
hidden = config.options.show_hidden,
}
if cd_successful then
builtin.file_browser(opt)
end
end
still not sure why it's throwing error though. I think telescope.load_extension("file_browser") is not needed.
Experiencing the same issue here in Lunarvim (most recent version). If I open projects through :Telescope projects and then hit <C-b>, I get this error message;
E5108: Error executing lua ...tart/project.nvim/lua/telescope/_extensions/projects.lua:97: attempt to call field 'file_browser' (a nil value)
stack traceback:
...tart/project.nvim/lua/telescope/_extensions/projects.lua:97: in function 'key_func'
...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:242: in function 'execute_keymap'
[string ":lua"]:1: in main chunk
Telescope moved file browser into a seperate repository, which changes how you open the file browser from lua. It's fixed in https://github.com/ahmedkhalf/project.nvim/pull/59, we are just waiting for merge.