petertriho / cmp-git

Git source for nvim-cmp
MIT License
396 stars 23 forks source link

Disable if not in git repo #46

Closed axieax closed 2 years ago

axieax commented 2 years ago

During normal usage of quick files / scripts (not in a Git repo), I keep getting the following warning, which I've just accepted for a very long time:

[cmp-git] [WARN 02:19:24] ...pack/packer/start/cmp-git/lua/cmp_git/sources/github.lua:209: Can't fetch Github issues or pull requests, not a github repository

However, upon closer investigation of the source code, it seems that this GitHub source check can be avoided if we ignore completion inside non-Git repositories.

axieax commented 2 years ago

Thanks!