nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.04k stars 463 forks source link

Bug: does not respect setting of option showtabline #1048

Open jototland opened 1 year ago

jototland commented 1 year ago

Self Checks

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

b1nhack commented 5 months ago

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.