Skip to content
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

Can't change color of status line #232

Closed
nettrino opened this issue Feb 7, 2023 · 8 comments
Closed

Can't change color of status line #232

nettrino opened this issue Feb 7, 2023 · 8 comments

Comments

@nettrino
Copy link

nettrino commented Feb 7, 2023

Hello, I am trying to change the color of the status line as per #195 but cannot do so. My main concern is that in the dimmed theme's horizontal splits the split line is not easy to discern from the background.

My current config/failing attempt is:

        use({
            "nvim-lualine/lualine.nvim",
            after = "github-nvim-theme",
            requires = { "kyazdani42/nvim-web-devicons", opt = true },
            config = function()
                require("lualine").setup({
                    options = {
                        theme = "auto", -- or you can assign github_* themes individually.
                        -- ... your lualine config
                    },
                })
            end,
        })

        use({
            "projekt0n/github-nvim-theme",
            config = function()
                require("github-theme").setup({
                    theme_style = "dimmed",
                    -- see github-theme/palette/dimmed.lua
                    colors = {
                        bg_search = "#00006b",
                    },
                    overrides = function(c)
                        return {
                            Statusline = { bg = "#00ff8b", fg = c.red },
                            StatuslineNC = { bg = "#0aa08b", fg = c.red },
                        }
                    end,
                    dev = true,
                })
            end,
        })

Any help would be appreciated

@ful1e5
Copy link
Member

ful1e5 commented Feb 17, 2023

If you want to personalize the colors of the statusline using the provided configuration, you may need to uninstall the lualine plugin and revert to the default statusline. This is because lualine comes with its own distinct highlights for each section, which can override any customizations you apply.

Alternatively, you could develop your own lualine theme that overwrites the colors. This can be accomplished by defining a theme within the lualine/theme/ directory. For inspiration, you can refer to github-nvim-theme/lua/lualine/themes.

@ful1e5
Copy link
Member

ful1e5 commented May 3, 2023

Closing due to inactivity. Can reopen later.

@ful1e5 ful1e5 closed this as completed May 3, 2023
@nettrino
Copy link
Author

@ful1e5 thanks for the reply - I only care about making splits more visible really so would not go into such extent as defining a full colorscheme just for that. There is no option to hardcode this post-initialization somehow?

@ful1e5
Copy link
Member

ful1e5 commented May 21, 2023

@nettrino, are you using the hide_nc_statuline option? If so, here is a workaround to make it visible:

require('github-theme').setup({
  options = {
    hide_nc_statusline = true,
  },
  groups = {
    all = {
      StatusLineNC = { bg = 'bg1', fg = 'bg1', sp = 'fg1', style = 'underline' },
    },
  },
})

vim.cmd('colorscheme github_dark')
make_underline_statusline_more_visible.mp4

@ful1e5 ful1e5 reopened this May 21, 2023
@nettrino
Copy link
Author

nettrino commented May 22, 2023

@ful1e5 No I wasn't - the issue for me is that I am using the dimmed flavor of github_dark with the following setup:

        use({
            "projekt0n/github-nvim-theme",
            config = function()
                require("github-theme").setup({
                    options = {
                        bg_search = "#00006b",
                    },
                    groups = {
                        all = {
                            StatusLineNC = { bg = "#00ff8b", fg = "#aaff8b", sp = "#00222b", style = "underline" },
                        },
                    },
                })
            end,
        })
        vim.cmd("colorscheme github_dark_dimmed")

The line is not visible as well as in the dark theme and I just want to have the color options take place if that makes sense.

My setup:
Screenshot 2023-05-22 at 9 37 23 PM

Github dark:
Screenshot 2023-05-22 at 9 36 07 PM

@ful1e5
Copy link
Member

ful1e5 commented May 26, 2023

@nettrino, the hide_nc_statusline option is enabled by default.

However, you have set it to false and overridden the highlight with groups. Have you tried compiling the theme you are using with :GithubThemeCompile afterward?

If it's still not working, please share your complete configuration here so I can better understand your issue. Also, I'm working on some visual changes for the selection list and statusline colors, so I can take care of your issue if it's a genuine problem.

@nettrino
Copy link
Author

@ful1e5 yeah it still is not working if I'm not mistaken. My vim config is https://github.com/nettrino/vimconf and I'm using alacritty on mac os x M1 with the following config:

colors:
  primary:
    background: "#22272e"
    foreground: "#d8d8d8"

  normal:
    black: "#484f58"
    red: "#ff8878"
    green: "#4e9a06"
    yellow: "#edd400"
    blue: '#73b7f2'
    magenta: "#ffb2fe"
    cyan: "#a2e1f8"
    white: "#f1f1f1"

  bright:
    # black: "#6e7681"
    black: "#484f58"
    red: "#fe978b"
    green: "#84d831"
    yellow: "#fce94f"
    blue: "#62b4f8"
    magenta: "#ffc6ff"
    cyan: "#c0e9f8"
    white: "#ffffff"


  # background_opacity: 1.0

  # Change cursor colors
  cursor:
    text: "#3B4252"
    cursor: "#ECEFF4"

cursor:
  style:
    blinking: Never

font:
  # The normal (roman) font face to use.
  normal:
    family: Hack Nerd Font
    # Style can be specified to pick a specific face.
    style: Regular

  # The bold font face
  bold:
    family: Hack Nerd Font 
    # Style can be specified to pick a specific face.
    style: Bold

  # The italic font face
  italic:
    family: Hack Nerd Font 
    # Style can be specified to pick a specific face.
    style: Italic

  size: 11.0

  ligatures: true

  offset:
    x: 0
    y: 0
  glyph_offset:
    x: 0
    y: 0
window:
  padding:
    x: 2
    y: 2
  # scrolling:
  #   # Maximum number of lines in the scrollback buffer.
  #   # Specifying '0' will disable scrolling.
  history: 100000
  #   # Number of lines the viewport will move for every line scrolled when
  #   # scrollback is enabled (history > 0).
  #   multiplier: 10

# Allow terminal applications to change Alacritty's window title.
  dynamic_title: true

  # # If `true`, bold text is drawn using the bright color variants.
  # draw_bold_text_with_bright_colors: true

  # selection:
  semantic_escape_chars: ',│`|:"'' ()[]{}<>'
  save_to_clipboard: true
  live_config_reload: true
key_bindings:
  - { key: V, mods: Control|Shift, action: Paste }
  - { key: C, mods: Control|Shift, action: Copy }
  - { key: Key0, mods: Control, action: ResetFontSize }
  - { key: Equals, mods: Control, action: IncreaseFontSize }
  - { key: Minus, mods: Control, action: DecreaseFontSize }
  # - { key: Add, mods: Control, action: IncreaseFontSize }
  # - { key: Subtract, mods: Control, action: DecreaseFontSize }
  # - { key: N, mods: Control, action: SpawnNewInstance }

@ful1e5
Copy link
Member

ful1e5 commented Jul 22, 2023

As #266 has been merged upstream, it fixes the statusline colors for the active mode and the minimal look as well.

I'm closing this issue due to inactivity, but feel free to reopen it if it hasn't been resolved.

@ful1e5 ful1e5 closed this as completed Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants