lualine.nvim icon indicating copy to clipboard operation
lualine.nvim copied to clipboard

Bug: does not respect setting of option showtabline

Open jototland opened this issue 2 years ago • 1 comments
trafficstars

Self Checks

  • [ X] I'm using the latest lualine.
  • [ X] I didn't find the issue in existing issues or PRs.

How to reproduce the problem

I assume you have lualine in a directory somewhere, my example config file loads it from where lazy plugin manager puts it for my main config.

Expected behaviour

Start vim without any arguments except to run with min.lua as configfile, e.g: nvim -u min.lua.

The value of showtabline should remain 1, and no tabline visible.

Actual behaviour

The value of showtabline is changed to 2 by the plugin. Tabline is visible even though there's only one tab in vim.

Minimal config to reproduce the issue

vim.opt_global.runtimepath:append(vim.fn.stdpath('data') .. '/lazy/lualine.nvim')
vim.opt_global.showtabline = 1

local lualine_ok, lualine = pcall(require, "lualine")
if not lualine_ok then
    vim.notify("Could not load lualine from other lazy configuration")
else
    lualine.setup({
        tabline = {
            lualine_c = { { "tabs", mode=2 }, },
        },
    })
end

if vim.go.showtabline ~= 1 then
    vim.notify("Showtabline value: " .. vim.go.showtabline)
end

Additional information

jototland avatar May 22 '23 15:05 jototland

I think this option should be left up to the user, whether it's respecting the neovim settings, or adding a option in the plugin.

b1nhack avatar May 06 '24 13:05 b1nhack

fixed with https://github.com/nvim-lualine/lualine.nvim/pull/1013

use always_show_tabline = false in config.

shadmansaleh avatar Nov 01 '24 07:11 shadmansaleh