juansalvatore / git-dashboard-nvim

Your git contributions heatmap chart inside your favorite nvim dashboards.
MIT License
50 stars 4 forks source link

Dashboard doesn't show if remote isn't named `origin` #9

Open csessh opened 4 hours ago

csessh commented 4 hours ago

It seems like this plugin looks for origin specifically (I have yet gone looking in the code).

Take this repo for example:

fw13 :: Documents/nvim-plugins/pendulum-nvim ‹main› » git remote -v
origin  git@github.com:ptdewey/pendulum-nvim.git (fetch)
origin  git@github.com:ptdewey/pendulum-nvim.git (push)

Sure enough, we get a heat map Screenshot from 2024-10-22 19-48-35

Another repo:

fw13 :: Documents/nvim-plugins/stopinsert.nvim ‹main› » git remote -v
tdo git@github.com:csessh/stopinsert.nvim.git (fetch)
tdo git@github.com:csessh/stopinsert.nvim.git (push)

we get a blank screen Screenshot from 2024-10-22 19-50-08

csessh commented 3 hours ago

It might not be just the origin as this also doesn't work

fw13 :: ~/.dotfiles ‹main*› » git remote -v
origin  git@github.com:csessh/.dotfiles.git (fetch)
origin  git@github.com:csessh/.dotfiles.git (push)

So it's two fold: a) if there isn't a origin remote, no fancy dashboard b) the regex matching remote_url won't match some cases like the two cases I have above (they both contain a . (dot) in their *.git repo name