Skip to content

Suggestion Style Settings

Endor H edited this page Sep 2, 2024 · 9 revisions

Important

If you're using v1.x of Smart Completion, some of these settings won't be available. Furthermore, the names of some settings/settings files were slightly different.

You may want to read Suggestion Style Settings (v1) instead.

Note

If you're playing on a Minecraft version prior to 1.20.3, you may need to edit these options by creating a resource pack, as the /smartcompletion command is not supported in earlier versions.

These settings define how suggestions are displayed, as long as the enable_suggestion_highlighting option is set to true.

Tip

Resource packs may define these options under a smart-completion/style.json file.

User config for these settings is managed by the /smartcompletion style command under the config/smart-completion/style.json file.

File structure

This file supports 7 style entries and 3 color entries.

Style entries:

  • suggestion the default style for suggestions (default: gray)
  • match the style for matches of words initials within suggestions (default: blue)
  • weak_match the style for fallback matches of your query within suggestions (default: dark_aqua)
  • prefix the style for resource location namespaces (such as minecraft:) (default: dark_gray)

Note

Resource location namespaces are only recognized if at the start of a suggestion.

  • repeat the style for a potential alternate match of a word initial (default: dark_aqua)
  • unexpected the style for unexpected suggestions from the server (affects the entire suggestion) (default: dark_aqua)
  • selected the style applied to the selected suggestion (default: #FFFF00 (yellow)) (since v1.1.0)

Color entries:

  • background_color the color for the background behind suggestions (default: #BD000000) (since v1.1.0)
  • background_selected_color the color for the background of the selected suggestion (default: #BD242424) (since v1.1.0)
  • ellipsis_color the color for the dots atop/below the suggestion list when scrolling is possible (default: #80FFFFFF) (since v2.0.0)

Additionally, a replace boolean key may be defined if you wish to replace all styles defined by resource packs with lower priority, rather than merge the styles.

Note

Unknown entries are tolerated and ignored for forwards compatibility.


Style Entries

Style entries use the same syntax as Minecraft's raw JSON text format, that is, it may contain the following properties:

  • color, one of the following:
    • A named color (black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white)
    • A custom color in RGB hexadecimal format (#RRGGBB) (does not support alpha channel (#AARRGGBB) nor the shorthand #RGB format)
  • bold (true/false)
  • italic (true/false)
  • underlined (true/false)
  • strikethrough (true/false)
  • obfuscated (true/false)

Color entries

Color entries use the same syntax as the color property of a style entry (as specified by Minecraft's raw JSON text format), optionally supporting an alpha channel. That is, a color entry must be:

  • A named color (black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white)
  • A custom color in ARGB/RGB hexadecimal (#AARRGGBB/#RRGGBB) (does not support shorthand #RGB nor #ARGB formats)

Example

The default style.json file looks as follows:

{
  "replace": false,

  "suggestion": {
  },
  "match": {
    "color": "blue"
  },
  "weak_match": {
    "color": "dark_aqua"
  },
  "prefix": {
    "color": "dark_gray"
  },
  "repeat": {
    "color": "dark_aqua"
  },
  "unexpected": {
    "color": "dark_aqua"
  },
  "selected": {
    "color": "#FFFF00"
  },

  "background_color": "#BD000000",
  "background_selected_color": "#BD242424",
  "ellipsis_color": "#80FFFFFF"
}

Home

All Versions

Home general

  • Smart Completion Settings v2 v1

    • Basic settings general
    • Suggestion Style Settings v2 v1
    • Flatcase Splitting Settings v2 v1
    • Cache Settings general
  • Miscellaneous

Clone this wiki locally