You need to have ripgrep installed.
Use your favourite plugin manager to install.
-- init.lua
require("packer").startup(function()
use "lukas-reineke/cmp-rg"
end)
" init.vim
call plug#begin('~/.vim/plugged')
Plug 'lukas-reineke/cmp-rg'
call plug#end()
Add rg
to your cmp sources
require("cmp").setup {
sources = {
{
name = "rg",
-- Try it when you feel cmp performance is poor
-- keyword_length = 3
},
},
}
For more options see :help cmp-rg