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

after update command list order is not preserved

doongjohn opened this issue · comments

the order of command list display does not match insertion order

command_center.add({
  {
    description = 'history',
    cmd = '<cmd>FzfLua command_history<cr>',
  }, {
    description = 'tab new',
    cmd = '<cmd>tabnew<cr>',
  }, {
    description = 'tab close',
    cmd = '<cmd>tabclose<cr>',
  },
}, {
  mode = command_center.mode.ADD_ONLY,
  category = "command",
})

image

This is expected since the last refactor to enhance performance. Do you have a solid reason for why you want commands to be displayed in the order they are inserted?

no real reason but it looks better if it's not displayed randomly 😄

As soon as you type something, the search results will be ordered by their relevancy to the keyword typed. So I don't see this as an issue.

I am going to close this issue. Feel free to open another one if you find a strong reason or use case to display the results in the order they've been inserted.