romgrk / barbar.nvim

The neovim tabline plugin.
2.16k stars 81 forks source link

Inactive buffer separator still visualize when disable separator #574

Closed ThaiDuy12345 closed 2 months ago

ThaiDuy12345 commented 2 months ago

Description

Inactive buffer still have some separators at the end when I have delete all separator

My config:

separator = { left = '', right = '' },
separator_at_end = false,

Steps to reproduce the behavior: Just open some new buffers with the above config

Screenshots

asdasd2

Informations Neovim version: 0.9.5

Iron-E commented 2 months ago

When re-implementing the icons option in #386, we had to preserve an independent default with icons.inactive.separator.left for backwards compatibility. In the short term, you can fix this with something like this:

--[[ minimal.lua ]]
vim.opt.rtp:prepend {
  vim.fn.stdpath('data') .. '/lazy/barbar.nvim',
}

vim.g.barbar_auto_setup = false
require('barbar').setup {
  icons = {
    filetype = { enabled = false },
    separator_at_end = false,

    separator = { left = '', right = '' },
    inactive = {
      separator = {
          left = '', -- ← this is the fix
      },
    },
  },
}

Run the above with nvim --clean -u minimal.lua to try it out without modifying your configuration. Adding the noted option above to your configuration should also produce the desired behavior.


@romgrk what is your opinion on changing this default before 2.0? We've had similar reports to this previously (#419, #513), so it seems to be a common pain point

ThaiDuy12345 commented 2 months ago
inactive = {
      separator = {
          left = '', -- ← this is the fix
      },
    },

This worked, thanks 😊

romgrk commented 2 months ago

what is your opinion on changing this default before 2.0?

What would be the downside?

Iron-E commented 1 month ago

What would be the downside?

The only one that comes to mind is that some users may have to adjust their configurations to get the results they saw previously.

romgrk commented 1 month ago

Not a fan, don't like forcing users to mess with their config.