Closed rockyzhang24 closed 3 years ago
You should try to reproduce with a minimal vimrc.
Still having no idea. ðŸ˜
I reproduced with a very minimal vimrc. I was just using minpac
plugin manager to install eleline
. The branch name was still not shown.
Then I did some further investigation. Please take a look at this piece of code in eleline.vim
(https://github.com/liuchengxu/eleline.vim/blob/master/plugin/eleline.vim#L94)
if !exists('*FugitiveExtractGitDir')
return ''
endif
I added echom "aaaa"
right above the return ''
and in neovim I could see the output aaaa
, which means the running fell into this if
block, and it returns an empty string eventually. I am not sure whether or not this is the reason leading to the issue.
UPDATE:
I didn't install vim-fugitive
because as the README said it is not required if I am using the latest neovim, right? However, based on the code itself, it seems that vim-fugitive
is necessary. If vim supports the job feature, it will get the branch name asynchronously but vim-fugitive
plugin should be installed no matter what, right?
Thank you very much.
Ok, the README is not very clear, eleline.vim will use the job feature to retrieve the git branch info when in a git repo, but the detection of the git directory is still dependent on the API of vim-fugitive.
Okay, so vim-fugitive is definitely required. I think it'd better update the README to make it clearer.
Thank you for your help.
Feel free to send a PR for adding such a note.
Hello,
The branch name is not shown. I am not using vim-fugitive.
neovim version: v0.5.0-dev+4d1fc167a, i.e., the latest master (installed via
brew --HEAD
) eleline: I have already updated it to the lastestI attached a screenshot showing the plugins I installed so far
Based on the README, the branch should be shown via the job feature. I don't know what's wrong on my side. Could you please do me a favor.
Thank you very much.