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

BREAKING CHANGES

FeiyouG opened this issue · comments

command_center.nvim breaking changes will be announced here

Replace command with cmd.:

{
  description = "...:",
  command = "...",
  ...
}

is replaced by

{
  description = "...:",
  cmd = "<CMD>...<CR>",
  ...
}

Using cmd gives you the benefit of using a Lua function or a key sequence as a command. For now, you can still use command without breaking the config, but the support for command may be completely removed in the next few updates.

Many keywords and constants are shortened to make command_center less verbose to use. Specifically:

  1. we used to specify a command to be added to command_center like this:

    {
      description = "...", 
      command = "...", 
      keybindings = { ... }, 
      category = "...",
      mode = ...
    }

    And now you can also add them like this:

    {
      desc = "...",
      cmd = "...",
      keys = { ... },
      category = "...",
      mode = ...
    }
  2. command_center.mode changed from this:

    mode = {
      ADD_ONLY = 1,      
      REGISTER_ONLY = 2,      
      ADD_AND_REGISTER = 3,  
    }

    to this:

    mode = {
      ADD = 1,      
      SET = 2,      
      AND_SET = 3,  
    }

The format for configuration has changed! Please refer to the README.md for details. Notes that if the passed-in user config is in incorrect format, the user config is ignored entirely.

If you don't wish to migrate to 0.2, you can use the tag 0.1 to stay in the old version.