cmp-rg
                                
                                 cmp-rg copied to clipboard
                                
                                    cmp-rg copied to clipboard
                            
                            
                            
                        Option to only run rg completion if in a git directory
There is a chance with cmp-rg to accidentally run a large completion job (even with max-depth set to something reasonable)
if you are in a directory that has lots of sub-directories.
If wanted this option would limit completion to only occur if you are currently in a git directory.
Which would lower the risk of freezing if a user opened neovim in their ~/git_projects folder, which at least for me with a max-depth of 4 accounts for 8259 directories
Thank you for the PR, but I think it would be nicer to do something like this instead https://github.com/hrsh7th/nvim-cmp/issues/632 Let's see what hrsh7th thinks.
Yeah good idea. Would be great to be built in. In fact I have another cmp plugin that relies on an auto command to load it in for a certain file type.
Sorry, I noticed afterward this opened PR. I proposed another solution here: https://github.com/lukas-reineke/cmp-rg/pull/47