Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGES #4

Open
FeiyouG opened this issue Apr 16, 2022 · 3 comments
Open

BREAKING CHANGES #4

FeiyouG opened this issue Apr 16, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@FeiyouG
Copy link
Owner

FeiyouG commented Apr 16, 2022

command_center.nvim breaking changes will be announced here

Repository owner locked as resolved and limited conversation to collaborators Apr 16, 2022
@FeiyouG
Copy link
Owner Author

FeiyouG commented Apr 16, 2022

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.

@FeiyouG FeiyouG added the documentation Improvements or additions to documentation label Jul 26, 2022
@FeiyouG
Copy link
Owner Author

FeiyouG commented Jul 29, 2022

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,  
    }

@FeiyouG
Copy link
Owner Author

FeiyouG commented Aug 27, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant