nvim-lualine / lualine.nvim

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

Have more than one row (multiple status lines) #1123

Open alexdrupal opened 10 months ago

alexdrupal commented 10 months ago

Hello,

Can I have more than one status line? I need to display full path to the current file and my current status line is truncates it and I don't have much to remove. Ideally would be to add a second row to the status line and display full path there.

Thanks!

MaienM commented 10 months ago

Neovim doesn't support this yet. It is on the backlog (https://github.com/neovim/neovim/issues/12925), but it doesn't look like anyone is actively working on it. As mentioned in that issue you could (ab)use a floating window for it, but it's not ideal (it'll close when dismissing floating windows with <C-W>o, some content might be hidden behind it, etc.).

curtisault commented 2 months ago

I feel like this is happening to me unintentionally. I don't know if this is specifically a lualine issue or a neovim issue.

Here's what I'm seeing.

multiple lualines

I Here's my config:

require('lualine').setup {
  options = {
    icons_enabled = true,
    theme = 'auto',
    -- theme = 'everforest',
    --component_separators = { left = '', right = ''},
    --section_separators = { left = '', right = ''},
    -- component_separators = { left = '╲', right = '╱' },
    -- section_separators = { left = '', right = '' },
    component_separators = { left = '╲', right = '╱' },
    section_separators = { left = '', right = '' },
    disabled_filetypes = {
      statusline = {},
      winbar = {},
    },
    ignore_focus = {},
    always_divide_middle = true,
    globalstatus = true,
    refresh = {
      statusline = 1000,
      tabline = 1000,
      winbar = 1000,
    }
  },
  sections = {
    lualine_a = {'mode'},
    lualine_b = {'branch', 'diff', 'diagnostics'},
    lualine_c = {
      -- 0 = just filename, 1 = relative path, 2 = absolute path
      {'filename', path = 1}, 
      'filesize'
    },
    lualine_x = {'encoding', 'fileformat', 'filetype'},
    lualine_y = {'progress'},
    lualine_z = {'location'}
  },
  inactive_sections = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = {'filename'},
    lualine_x = {'location'},
    lualine_y = {},
    lualine_z = {}
  },
  tabline = {},
  winbar = {},
  inactive_winbar = {},
  extensions = {}
}