Skip to content

Suggestion Style Settings (v1)

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

Important

You're reading documentation for v1 of the Smart Completion mod. To read about the suggestion style settings for the latest version of this mod, go here.

The style of suggestions is configured by the completion_style.json file. This file must be located within a smart-completion folder inside your resource pack.

File structure

This file supports 7 style entries and 2 color entries.

Style entries:

  • suggestion the default style for suggestions (default: gray)
  • match the style for matches of words initials within suggestions (default: blue)
  • dumb_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 the color for the background behind suggestions (default: #BD000000) (since v1.1.0)
  • background_selected the color for the background of the selected suggestion (default: #BD242424) (since v1.1.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 completion_style.json file looks as follows:

{
  "replace": false,
  "suggestion": {
  },
  "match": {
    "color": "blue",
    "bold": true
  },
  "dumb_match": {
    "color": "dark_aqua"
  },
  "prefix": {
    "color": "dark_gray"
  },
  "repeat": {
    "color": "dark_aqua"
  },
  "unexpected": {
    "color": "dark_aqua"
  },
  "selected": {
    "color": "#FFFF00"
  },

  "background": "#BD000000",
  "background_selected": "#BD242424"
}

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