ahmedkhalf / project.nvim

The superior project management solution for neovim.
Apache License 2.0
1.29k stars 119 forks source link

BUG: Error in plenary when running Telescope project #115

Closed Zeioth closed 1 year ago

Zeioth commented 1 year ago

screenshot_2023-05-17_03-06-38_118881695 Adding the line

require'telescope'.extensions.projects.projects{}

to telescope config function throw the next error in plenary when opening telescope.

Error executing vim.schedule lua callback: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/telescop
e.nvim/lua/telescope/pickers.lua:861: Invalid buffer id: 4
stack traceback:
        [C]: in function 'error'
        ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
        ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function <...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:44>
Zeioth commented 1 year ago

SOLVED: Here is an example configuration for lazy.nvim

{
    "ahmedkhalf/project.nvim",
    event = "VeryLazy",
    opts = { ignore_lsp = { "lua_ls" } },
    config = function(_, opts) require("project_nvim").setup(opts) end,
  },
  { "nvim-telescope/telescope.nvim", opts = function() require("telescope").load_extension "projects" end },

Source: https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/project/project-nvim/project-nvim.lua