qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.66k stars 218 forks source link

Make VimR tab colors match 1:1 with colorscheme. #1072

Closed s-daveb closed 3 months ago

s-daveb commented 3 months ago

Background:

See issue #1069 - Themes with Hi groups using "links" to other Hi groups do not propagate colors to SwiftUI properly.

Description:

This pull requests further expands upon my previous PR, more closely setting the VimR tab colors to match the colors specified by the vim colors scheme.

Not only does it pull in the Tabline color definition, but it also pulls in TablineFill for the tabbar background, and TablineSel to highlight the current selected tab.

I've also tweaked the default colors selected when VimR is not set to use vim's color scheme, and have tested in both light and dark mode.

Please look over my PR and let me know if there are any mistakes that could lead to stability problems. So far

Additional Change:

I noticed a TODO: regarding the default color scheme when VimR is set to use the native Coacoa colors, and added a call to NSColor.Name() to select the user's chosen accent color from system settings.

One limitation of this change is that the VimR tab UI does not pick up on changes between Dark Mode and Light Mode. I considered polling the plist settings, but I would like to implement that with an event listener to prevent slow polling threads in the background. I am still doing research on how to do this.

For now, use either the Vim color scheme, or re-open the VimR window when changing the system them.

Screenshot 2024-06-10 at 6 36 00 PM

Screenshot 2024-06-10 at 6 36 08 PM

Screenshot 2024-06-10 at 6 36 16 PM

Screenshot 2024-06-10 at 6 36 23 PM