polirritmico / telescope-lazy-plugins.nvim

A Telescope picker to quickly access configurations of plugins managed by lazy.nvim.
MIT License
52 stars 1 forks source link

Bug: Search links to wrong location #8

Closed kevintraver closed 2 months ago

kevintraver commented 3 months ago

Steps to reproduce:

require("lazy").setup({
    spec = {
        { "LazyVim/LazyVim", import = "lazyvim.plugins" },
        { import = "plugins" },
        {
          "polirritmico/telescope-lazy-plugins.nvim",
          config = function()
            require("telescope").setup({
              extensions = {
                lazy_plugins = {},
              },
            })
            require("telescope").load_extension("lazy_plugins")
          end,
        },
      }
    )}

In plugins file, if an import is before the plugin, then searching for the plugin (in this case searching for 'octo') does not work and incorrectly links to local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

This does not work:

-- lua/plugins/octo.lua
return {
  { import = "lazyvim.plugins.extras.lang.git" },
  {
    "pwntester/octo.nvim",
  },
}

this does work:

-- lua/plugins/octo.lua
return {
  {
    "pwntester/octo.nvim",
  },
  { import = "lazyvim.plugins.extras.lang.git" },
}
polirritmico commented 2 months ago

Hi. Sorry the late response. Are you still having this issue with lazy 11?

kevintraver commented 2 months ago

It appears to be fixed! Thanks!