AstroNvim / AstroNvim

AstroNvim is an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins
https://AstroNvim.com
GNU General Public License v3.0
12.56k stars 917 forks source link

Request: Only show tab as active in tabline, if buffer is the currently selected split #1767

Closed praveenperera closed 1 year ago

praveenperera commented 1 year ago

Is your feature related to a problem?

I usually have to vertical splits open at all times. In the tab line both open buffers have the active styling. And I sometimes get confused which file I'm currently focused on.

Describe the new feature

Either:

  1. Default to only showing active styling on tab in currently focused split
  2. Keep current default but add easy config option to only apply the active styling to tab I'm currently focused on in a split
  3. 3 states, active, active-focused, inactive

Additional context

Only one tab should have active styling.

Screenshot 2023-04-13 at 1 11 27 PM
mehalter commented 1 year ago

ay I see! the difference that we have in this case is that the tab for the focused window is bold and italic and you might not be using a terminal/font that supports bold/italics.

Here is a snippet for customizing this in your user configuration:

return {
  heirline = {
    -- customize heirline colors
    colors = function(colors)
      -- make visible buffers the same background
      colors.buffer_visible_bg = colors.buffer_bg

      return colors
    end
  }
}
praveenperera commented 1 year ago

Switched from FiraCode to JetBrains Mono, much better thank you!

Screenshot 2023-04-14 at 10 09 19 AM
praveenperera commented 3 months ago

@mehalter was the italic for active tab remove? This is what i'm seeing below. Whats the easiest way of de-emphasizing the open but not currently active tab?

Screenshot 2024-05-29 at 8 23 17 AM
mehalter commented 3 months ago

Nope, it's still there in a base installation. You must have something in your user configuration

2024-05-29_09:41:38_screenshot

mehalter commented 3 months ago

could also be if you changed terminals and it's not properly configured with italics

mehalter commented 3 months ago

For debugging purposes for your config, you can use the plugin_opts utility in AstroCore to check your config:

:lua =require("astrocore").plugin_opts("astroui").status.attributes.buffer_active
praveenperera commented 3 months ago
::lua =require("astrocore").plugin_opts("astroui").status.attributes.buffer_active
{
  bold = true,
  fg = "buffer_active_fg",
  italic = true
}

Also italic is working in my terminal I tested, see image

Screenshot 2024-05-29 at 9 09 55 AM
mehalter commented 3 months ago

@praveenperera I loaded up your configuration that it located here: https://github.com/praveenperera/dotfiles/tree/master/nvim

and I am getting italics in my terminal

2024-05-29_10:15:53_screenshot

praveenperera commented 3 months ago

thats interesting, its weird that italics works with echo. Thanks for checking, I appreciate it, I'll try and figure it out. I'm using alacrity by the way.

praveenperera commented 3 months ago

Figured it out at some point TERM got set to screen-256color, changed it back to xterm-256color and its working again. Thanks for your help.

mehalter commented 3 months ago

that will do it!