VS Code API
    Preparing search index...

    Interface StatusBarItem

    A status bar item is a status bar contribution that can show text and icons and run a command on click.

    interface StatusBarItem {
        accessibilityInformation: AccessibilityInformation | undefined;
        alignment: StatusBarAlignment;
        backgroundColor: ThemeColor | undefined;
        color: string | ThemeColor | undefined;
        command: string | Command | undefined;
        id: string;
        name: string | undefined;
        priority: number | undefined;
        text: string;
        tooltip: string | MarkdownString | undefined;
        dispose(): void;
        hide(): void;
        show(): void;
    }
    Index

    Properties

    accessibilityInformation: AccessibilityInformation | undefined

    Accessibility information used when a screen reader interacts with this StatusBar item

    The alignment of this item.

    backgroundColor: ThemeColor | undefined

    The background color for this entry.

    Note: only the following colors are supported:

    • new ThemeColor('statusBarItem.errorBackground')
    • new ThemeColor('statusBarItem.warningBackground')

    More background colors may be supported in the future.

    Note: when a background color is set, the statusbar may override the color choice to ensure the entry is readable in all themes.

    color: string | ThemeColor | undefined

    The foreground color for this entry.

    command: string | Command | undefined

    Command or identifier of a command to run on click.

    The command must be known.

    Note that if this is a Command object, only the command and arguments are used by the editor.

    id: string

    The identifier of this item.

    Note: if no identifier was provided by the window.createStatusBarItem method, the identifier will match the extension identifier.

    name: string | undefined

    The name of the entry, like 'Python Language Indicator', 'Git Status' etc. Try to keep the length of the name short, yet descriptive enough that users can understand what the status bar item is about.

    priority: number | undefined

    The priority of this item. Higher value means the item should be shown more to the left.

    text: string

    The text to show for the entry. You can embed icons in the text by leveraging the syntax:

    My text $(icon-name) contains icons like $(icon-name) this one.

    Where the icon-name is taken from the ThemeIcon icon set, e.g. light-bulb, thumbsup, zap etc.

    tooltip: string | MarkdownString | undefined

    The tooltip text when you hover over this entry.

    Methods

    • Dispose and free associated resources. Call hide.

      Returns void

    • Hide the entry in the status bar.

      Returns void

    • Shows the entry in the status bar.

      Returns void