There's a CompletionItemKind.Color but as far as I can tell from the source, it'll only work if the label or documentation matches a specific regex that's hard-coded:
|
let color = matchesColor(suggestion.label) || typeof suggestion.documentation === 'string' && matchesColor(suggestion.documentation); |

It would be much better if an extension can supply this value in another field that doesn't require that it replaces the entire label or description with just the hex value.
There's a
CompletionItemKind.Colorbut as far as I can tell from the source, it'll only work if the label or documentation matches a specific regex that's hard-coded:vscode/src/vs/editor/contrib/suggest/suggestWidget.ts
Line 148 in 8a79656
It would be much better if an extension can supply this value in another field that doesn't require that it replaces the entire
labelordescriptionwith just the hex value.