andreyorst / powerline.kak

Kakoune modeline, but with passion
MIT License
50 stars 8 forks source link

The mode_info module doesn't display themed colors #27

Closed bound-variable closed 2 years ago

bound-variable commented 2 years ago

Problem description

The insert and select are pulling their colors from my kakrc, not from the color definitions of any of powerline's themes.

20220405_21h00m32s_grim

I tried removing the color definitions from my kakrc, but then mode_info just uses my default foreground from Kakoune (off-white).

Config

### Powerline
    require-module powerline
    set-option global powerline_format 'git bufname filetype mode_info lsp'
    set-option global powerline_shorten_bufname name
    powerline-start
    hook global BufOpenFile .* expandtab
    hook global BufNewFile  .* expandtab

Environment information

Kakoune version: v2021.11.08 OS version: Arch sh executable version: zsh 5.8.1

andreyorst commented 2 years ago

This is because the {{mode_info}} part of modeline can't be colored the way the rest of the text is colored. You can see that for yourself with this command:

set buffer modelinefmt "{red,blue}foo{{mode_info}}bar" 

Powerline can't do much about it, unfortunately, and because of that you have to use a proper powerline theme that matches your kakoune theme.

The same applies to the [+] symbol that is displayed when file is edited.

I mean, I could add a call to set-face in these modules, so they would color the module to match powerline theme, but it may break other places. For instance [+] shares the same face as information boxes, and it can be not very pleasant to read.

andreyorst commented 2 years ago

I'm going to close this, as this isn't much I can do unless Kakoune will allow coloring these elements separately from the rest of UI