-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
branch
supports oil
now
#1242
branch
supports oil
now
#1242
Conversation
Bumping this PR, I would also like these changes. |
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 |
If I understand correctly with this enabled branch component shows git branch based on which directory you have opened in oil right? This effects all buffere not just the oil buffer? or is it just on the window where oil is opened? |
yes
It affects all buffers, this is fine because |
I first thought that I should check the buffer filetype as you can see in this commit But I ran into some issues where I presume lualine updates before oil sets the buffer type or something like that and that code just did not work, but I am very new to nvim/lua in general so it could be a skil issue |
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#1077
#1077 (comment)