From 91d160e1576973d2160248461f51d0b6d0e3e232 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 26 Jul 2024 15:50:58 +0530 Subject: [PATCH] nvim: init: Override default grepprg When setting grepprg to ripgrep, neovim passes -uuu which disables ripgrep's default filtering which also ends up searching in binary files which is not what we want. It also ignores our ripgreprc and .ignore we have setup. neovim tries to match behaviour of standard grep which we do not care about. The default behaviour becomes a lot confusing when we start getting results from clangd cache or search index. --- nvim/.config/nvim/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 3d7e429..afe878e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -35,6 +35,7 @@ vim.o.signcolumn = "auto:1-2" vim.o.spelllang = "en_gb" vim.o.spelloptions = "camel,noplainbuffer" vim.o.spell = true +vim.o.grepprg = "rg --vimgrep" -- Disable providers we do not give a shit about vim.g.loaded_python3_provider = 0