Giter Site home page Giter Site logo

No git branch name about eleline.vim HOT 6 CLOSED

liuchengxu avatar liuchengxu commented on August 25, 2024
No git branch name

from eleline.vim.

Comments (6)

liuchengxu avatar liuchengxu commented on August 25, 2024

You should try to reproduce with a minimal vimrc.

from eleline.vim.

rockyzhang24 avatar rockyzhang24 commented on August 25, 2024

Still having no idea. 😭

from eleline.vim.

rockyzhang24 avatar rockyzhang24 commented on August 25, 2024

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.

from eleline.vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

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.

from eleline.vim.

rockyzhang24 avatar rockyzhang24 commented on August 25, 2024

Okay, so vim-fugitive is definitely required. I think it'd better update the README to make it clearer.

Thank you for your help.

from eleline.vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

Feel free to send a PR for adding such a note.

from eleline.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.