plugins.ccc.settings

Options provided to the require('ccc').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  default_color = "#FFFFFF";
  highlight_mode = "fg";
  highlighter = {
    auto_enable = true;
    excludes = [
      "markdown"
    ];
    lsp = false;
    update_insert = false;
  };
  inputs = [
    "ccc.input.oklab"
    "ccc.input.oklch"
  ];
  lsp = false;
  outputs = [
    "ccc.output.css_oklab"
    "ccc.output.css_oklch"
  ];
  pickers = [
    "ccc.picker.css_oklch"
    "ccc.picker.css_name"
    "ccc.picker.hex"
  ];
}

Declared by:

plugins.ccc.settings.convert

Specify the correspondence between picker and output. The default setting converts the color to css_rgb if it is in hex format, to css_hsl if it is in css_rgb format, and to hex if it is in css_hsl format.

Plugin default:

  [
    ["ccc.picker.hex" "ccc.output.css_rgb"]
    ["ccc.picker.css_rgb" "ccc.output.css_hsl"]
    ["ccc.picker.css_hsl" "ccc.output.hex"]
  ]

Type: null or (list of list of lua code string) or raw lua code

Default: [ ]

Example:

[
  [
    "ccc.picker.hex"
    "ccc.output.css_oklch"
  ]
  [
    "ccc.picker.css_oklch"
    "ccc.output.hex"
  ]
]

Declared by:

plugins.ccc.settings.default_color

The default color used when a color cannot be picked. It must be HEX format.

Plugin default: "#000000"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.ccc.settings.highlight_mode

Option to highlight text foreground or background. It is used to output_line and highlighter.

Plugin default: "bg"

Type: null or one of “bg”, “fg”, “background”, “foreground” or raw lua code

Default: null

Declared by:

plugins.ccc.settings.inputs

List of color system to be activated. ccc-action-toggle_input_mode toggles in this order. The first one is the default used at the first startup. Once activated, it will keep the previous input mode.

Plugin default:

  [
    "ccc.input.rgb"
    "ccc.input.hsl"
    "ccc.input.cmyk"
  ]

Type: list of lua code string

Default: [ ]

Example:

[
  "ccc.input.rgb"
  "ccc.input.hsl"
  "ccc.input.hwb"
  "ccc.input.lab"
  "ccc.input.lch"
  "ccc.input.oklab"
  "ccc.input.oklch"
  "ccc.input.cmyk"
  "ccc.input.hsluv"
  "ccc.input.okhsl"
  "ccc.input.hsv"
  "ccc.input.okhsv"
  "ccc.input.xyz"
]

Declared by:

plugins.ccc.settings.lsp

Whether to enable LSP support. The color information is updated in the background and the result is used by :CccPick and highlighter.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.ccc.settings.outputs

List of output format to be activated. ccc-action-toggle_ouotput_mode toggles in this order. The first one is the default used at the first startup. Once activated, it will keep the previous output mode.

Plugin default:

  [
    "ccc.output.hex"
    "ccc.output.hex_short"
    "ccc.output.css_rgb"
    "ccc.output.css_hsl"
  ]

Type: list of lua code string

Default: [ ]

Example:

[
  "ccc.output.hex"
  "ccc.output.hex_short"
  "ccc.output.css_rgb"
  "ccc.output.css_hsl"
  "ccc.output.css_hwb"
  "ccc.output.css_lab"
  "ccc.output.css_lch"
  "ccc.output.css_oklab"
  "ccc.output.css_oklch"
  "ccc.output.float"
  "ccc.output.hex.setup({ uppercase = true })"
  "ccc.output.hex_short.setup({ uppercase = true })"
]

Declared by:

plugins.ccc.settings.pickers

List of formats that can be detected by :CccPick to be activated.

Plugin default:

  [
    "ccc.picker.hex"
    "ccc.picker.css_rgb"
    "ccc.picker.css_hsl"
    "ccc.picker.css_hwb"
    "ccc.picker.css_lab"
    "ccc.picker.css_lch"
    "ccc.picker.css_oklab"
    "ccc.picker.css_oklch"
  ]

Type: list of lua code string

Default: [ ]

Example:

[
  "ccc.picker.hex"
  "ccc.picker.css_rgb"
  "ccc.picker.css_hsl"
  "ccc.picker.css_hwb"
  "ccc.picker.css_lab"
  "ccc.picker.css_lch"
  "ccc.picker.css_oklab"
  "ccc.picker.css_oklch"
  "ccc.picker.css_name"
]

Declared by: