nvim-lualine / lualine.nvim

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

Bug: Relative path for filename shows no data #1139

Open bkjohnson opened 8 months ago

bkjohnson commented 8 months ago

Self Checks

How to reproduce the problem

With the plugin configured to have a filename component that should show a relative path, open any file.

Expected behaviour

I see a filename with relative path in my status line.

Actual behaviour

I see nothing in the component that should be showing a filename with relative path.

Minimal config to reproduce the issue

I'm setting lualine_a to be the basic filename component to confirm that it works, but lualine_c shows nothing when I try to use the same component with a relative path.

-- Bootstrap lazy.nvim 
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  {'nvim-lualine/lualine.nvim',
    config = function()
      require('lualine').setup({
        sections = {
          lualine_a = {'filename'},
          lualine_c = {
            {'filename', path = 1},
          }
        }
      })
    end
  }
})

Additional information

I'm on Ubuntu 22.04 and nvim v0.10.0-dev

clarkezone commented 1 month ago

any idea if / when this will be fixed?

shadmansaleh commented 1 month ago

I couldn't reproduce it with the same config.