t-troebst / perfanno.nvim

NeoVim lua plugin that annotates source code with profiling information from perf or other profilers
MIT License
206 stars 4 forks source link

Seperate telescope initilialization in setup method #10

Open orhnk opened 1 year ago

orhnk commented 1 year ago

image

This error is specific to your plugin (Nice plugin btw!)

adding perfanno as an external telescope dependency does not work.

I think that's because setup function tries to handle Telescope extensions which is not how other plugins do that.

This could be the plugin's choice but You need to make sure that there is no performance flaw

What do I mean:

Perfanno (Default)

-- Lazy.nvim
{
"t-troebst/perfanno.nvim",
-- ...
config = function()
    require("perfanno").setup() --> Which sets up telescope extension
    -- But this way there is no: `:Telescope perfanno` 
end,
-- ...
},

Perfanno (Err!)

[!NOTE] Other plugins require you to write code like below:

{
    "nvim-telescope/telescope.nvim",

    dependencies = {
      "t-troebst/perfanno.nvim",
    },

    opts = {
      extensions = {
            perfanno = { ... },
      },
},

{
"t-troebst/perfanno.nvim",
-- ...
}