VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
14.01k stars 1.32k forks source link

Granular Status Bar item color control #9232

Open ColinMelendez opened 2 months ago

ColinMelendez commented 2 months ago

What this PR does / why we need it: This PR adds the ability to specify colors for the extension's status bar item text directly via theme settings with different colors for each mode. Example:

vim-mode-color-demo

This is a nice feature for those who would like to have some easy visual indication of the current mode without having to color the entire status bar.

The approach provides customization options in a more idiomatic way for VS Code; allowing users to specify the color options as part of a theme or under the standard "workbench.colorCustomizations" setting.

The original method of coloring the status bar is unchanged and unaffected by this PR - this is only an additional option that users can take advantage of by specifying color values for any of:

        "statusBarItem.vimMode.Normal"
        "statusBarItem.vimMode.Insert"
        "statusBarItem.vimMode.Visual"
        "statusBarItem.vimMode.VisualBlock"
        "statusBarItem.vimMode.VisualLine"
        "statusBarItem.vimMode.Replace"
        "statusBarItem.vimMode.EasyMotionMode"
        "statusBarItem.vimMode.EasyMotionInputMode"
        "statusBarItem.vimMode.SurroundInputMode"
        "statusBarItem.vimMode.Disabled"
        "statusBarItem.vimMode.SearchInProgressMode"
        "statusBarItem.vimMode.CommandlineInProgress"

under "workbench.colorCustomizations" in their settings.

All of the colors default to "statusBar.foreground" if unspecified.

Which issue(s) this PR fixes resolves #8741

Special notes for your reviewer: I can add a section to the readme if desired.