From fd3a54ce6282bd1e271db9ed16a10125ab1f277b Mon Sep 17 00:00:00 2001 From: inkch Date: Tue, 12 Mar 2024 12:25:38 +0900 Subject: [PATCH] nvim: set `ripgrep` as `grepprg` --- dot_config/nvim/lua/core/options.lua.tmpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dot_config/nvim/lua/core/options.lua.tmpl b/dot_config/nvim/lua/core/options.lua.tmpl index dd46984..0a3fa9f 100644 --- a/dot_config/nvim/lua/core/options.lua.tmpl +++ b/dot_config/nvim/lua/core/options.lua.tmpl @@ -37,6 +37,10 @@ vim.opt.listchars = "tab:>>,trail:_,eol:$,multispace:ยทยท,extends:>,precedes:<,n vim.opt.encoding = "utf-8" vim.opt.fenc = "utf-8" +if vim.fn.executable('rg') then + vim.opt.grepprg = 'rg --vimgrep --smart-case --hidden' +end + {{- if eq .chezmoi.username "root" }} vim.opt.expandtab = false {{- else }}