import * as vscode from 'vscode' ; /** Describes conditions in which a symbol may be temporarily revealed */ export type UglyRevelation = 'cursor' | 'cursor-inside' | 'active-line' | 'selection' | 'none' ; /** Controls how a symbol is rendered when a cursor is on it */ export type PrettyCursor = 'boxed' | 'none' ; /** Essentially mirrors vscode.DecorationRenderOptions, but restricted to the
 * properties that apply to both :before/:after decorations and plain decorations */ export interface PrettyStyleProperties { border ? : string ; textDecoration ? : string ; color ? : string | vscode . ThemeColor ; backgroundColor ? : string | vscode . ThemeColor ; hackCSS ? : string ; } export interface PrettyStyle extends PrettyStyleProperties { dark ? : PrettyStyleProperties ; light ? : PrettyStyleProperties ; } /** Copy all defined stying properties to the target */ export function assignStyleProperties ( target , source ) { if ( target === undefined || source === undefined ) return ; if ( source . backgroundColor ) target . backgroundColor = source . backgroundColor ; if ( source . border ) target . border = source . border ; if ( source . color ) target . color = source . color ; if ( source . textDecoration ) { target . textDecoration = source . textDecoration + ( source . hackCSS ? '; ' + source . hackCSS : "" ) ; } else if ( source . hackCSS ) target . textDecoration = 'none; ' + source . hackCSS ; } /** An individual substitution */ export interface Substitution { ugly : string ; pretty : string ; pre ? : string ; post ? : string ; style ? : PrettyStyle ; scope ? : string ; } /** The substitution settings for a language (or group of languages) */ export interface LanguageEntry { /** language(s) to apply these substitutions on */ language : vscode . DocumentSelector ; /** substitution rules */ substitutions : Substitution [ ] ; /** If `true`, combine adjacent tokens if they have the same scope name */ combineIdenticalScopes : boolean ; /** try to make pretty-symbol act like a single character */ adjustCursorMovement ? : boolean ; /** when to unfold a symbol to reveal its underlying text; in response to cursors or selections */ revealOn ? : UglyRevelation ; /** rendering tweaks to a symbol when in proximity to the cursor */ prettyCursor ? : PrettyCursor ; /** The filename of the language's grammar. If specified, substitutions' scope entries refer to scope names in the given grammar. If undefined, then search for a grammar.*/ textMateGrammar ? : string ; /** Override the TextMate scope for the language */ textMateInitialScope ? : string ; } export type HideTextMethod = "hack-fontSize" | "hack-letterSpacing" | "none" ; /** The settings for `prettifySymbolsMode.substitutions` */ export interface Settings { /** Main substitution settings, each targetting a different set of languages.
     * If more than one entry matches a document, we will pick the one with the
     * highest match-score, as determined by vscode.languages.match()
    */ substitutions : LanguageEntry [ ] ; /** try to make pretty-symbol act like a single character */ adjustCursorMovement : boolean ; /** when to unfold a symbol to reveal its underlying text; in response to cursors or selections */ revealOn : UglyRevelation ; /** rendering tweaks to a symbol when in proximity to the cursor */ prettyCursor : PrettyCursor ; /** */ hideTextMethod : HideTextMethod ; }