From 3f71b3e920252a88450cb66bd55f4e5e88e1dabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 2 Jun 2022 16:52:59 +0200 Subject: [PATCH] Set rg as grepprg when available --- symlinks/config/nvim/plugin/grep.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 symlinks/config/nvim/plugin/grep.lua diff --git a/symlinks/config/nvim/plugin/grep.lua b/symlinks/config/nvim/plugin/grep.lua new file mode 100644 index 0000000..3515abc --- /dev/null +++ b/symlinks/config/nvim/plugin/grep.lua @@ -0,0 +1,6 @@ +-- Vim grep configuration + +if vim.fn.executable("rg") == 1 then + vim.o.grepprg = "rg --vimgrep --hidden --glob ‘!.git’" + vim.o.grepformat = vim.o.grepformat .. "," .. "%f:%l:%c:%m" +end