FeiyouG / commander.nvim

Create and manage keybindings and commands in a more organized manner, and search them quickly through Telescope

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] <cmd>Telescope commander<cr> does not trigger the original command, but instead triggers the most recent command.

bommbo opened this issue · comments

neovim config:

{
    "FeiyouG/commander.nvim",
    commit = "9febde3150e29915b72c2ee8da500d396c8dba03",
    dependencies = {
      "nvim-telescope/telescope.nvim",
    },
    keys = {
      {
        "<leader>fm",
        "<cmd>Telescope commander<cr>",
        desc = "telescope commander",
        mode = "n",
      },
    },
    config = function()
      require("commander").setup({
        -- Specify what components are shown in the prompt;
        -- Order matters, and components may repeat
        components = {
          "DESC",
          "KEYS",
          "CMD",
          "CAT",
        },

        -- Specify by what components the commands is sorted
        -- Order does not matter
        sort_by = {
          "DESC",
          "KEYS",
          "CMD",
          "CAT",
        },

        -- Change the separator used to separate each component
        separator = " ",

        -- When set to true,
        -- The desc component will be populated with cmd if desc is empty or missing.
        auto_replace_desc_with_cmd = true,

        -- Default title of the prompt
        prompt_title = "Commander",
        -- enable integration
        integration = {
          telescope = {
            enable = true,
          },
          lazy = {
            enable = true,
            -- set_plugin_name_as_cat = true,
          },
        },
      })
    end,
  }

desc:

Telescope commander does not trigger the original command, but instead triggers the most recent command.
eg:
1 Telescope commander --> show telescope table --> choose command "Find Files"
2 Telescope commander --> Find Files

The bug originated from commit 2b048d5.

Hi @bommbo, I can't reproduce it on my end. Could you please update Commander and Telescope to the newest version and try if the bug still exist?

I can't reproduce it when I update those plugin. It will reopened when the same issue comes up again.