-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change status bar color based on mode #1056
Comments
This is tracked on the vscode repo: microsoft/vscode#1884 |
Something similar to these two vim plugins would be really nice:
For VSCodeVim another color when typing in a Search (e.g. |
any updates? If is it not possible can you just append the statusbar-item div with a class? like |
This is still experimental in vscode so was waiting a little bit for more adoption. Just to get some feedback on this, would it be ok for something like this as config options:
|
@xconverge Can I help you with? |
I will take a stab at it tonight if I get a chance! I will let you know, one thing I do know is that I have 0 clue on what colors are used, that was going to be left up to the user. If you can pick some default colors though, that would be helpful. |
there are no default colors! Everyone usually pick a color/theme for airline or lightline. Have a look here: https://github.com/itchyny/lightline.vim As you can see it depends on the theme |
Then how about these colors ;) https://github.com/itchyny/lightline.vim#powerline-theme-default |
Also, I think from the vscode implementation, the entire bar will change colors, so font color to read on it is going to be annoying, I will try it out and post some screenshots here for review though |
It'd be great if you can customise theme in the settings using |
works fine |
This seems to knock out my other theme color tweaks, is there a way to not blow out the other stuff in |
Is it possible to change foreground color? |
there is "statusBar.foreground" option that works. May be someone made a PR? |
I've just added solution to change foreground in my PR #2102 |
This works but it's a performance killer. Repaints are happening on every key stroke. |
Let me take a peek and make sure it is only done on mode transitions |
I have a profile showing the keystrokes and the repaints. They stop when I change the status bar setting. Will post the profile tomorrow if you like. |
I took a look this morning, it is definitely doing stuff every keystroke, not just on mode changes my ONLY concern, is how to make sure things are really correct. For example, when switching tabs, it needs to accurately represent the new tabs state, so if one is in visual and one is in normal, how do we ensure things are all synced up and the proper color is displayed. I think I have an idea, just cache the last mode in our statusBar singleton, and only do anything with color if newMode != oldMode Will see if I can get a fix in tonight! Edit: Yes looking at it, this should be very straight forward, something like this: Line 33 in d2e869f
Just add this to the top of SetColor() and also pass in the mode:
We are already doing this in SetText more or less |
I understand that this may not currently be possible with VS Code but the thing I'm missing most in switching from Vim is the color-indicated mode bar from lightline.
The text was updated successfully, but these errors were encountered: