nvim-lualine / lualine.nvim

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

`branch` supports `oil` now #1242

Open Tronikelis opened 1 month ago

Tronikelis commented 1 month ago

Hey, so when using oil file manager the branch is empty when viewing an oil buffer, this is because oil has its own path, now this is a small change to make it work, but I don't really like modifying globally the component like this, maybe this project should have some hooks or apis that the user could override, like get_buffer_dir ?

The same problem is with filename component and the fix is the same to use the oil api get_current_dir, so thats why I think having a global user editable api for directories would be a great option

https://github.com/nvim-lualine/lualine.nvim/issues/1077

https://github.com/nvim-lualine/lualine.nvim/issues/1077#issuecomment-2119754614

dtvillafana commented 1 month ago

Bumping this PR, I would also like these changes.

Tronikelis commented 1 month ago

If anyone wants these changes already, I created a separate plugin that patches the lualine components and exports them https://github.com/Tronikelis/lualine-components.nvim