nvim: use rg for :grep if installed

This commit is contained in:
Fernando Schauenburg 2024-07-24 22:06:07 +02:00
parent c44785f3a7
commit e814da54a9

View file

@ -10,6 +10,12 @@ M.setup = function()
local o = vim.opt
-- Use `rg` for :grep if installed.
if vim.fn.executable("rg") == 1 then
o.grepprg = "rg --vimgrep --no-heading --smart-case"
o.grepformat = "%f:%l:%c:%m,%f:%l:%m"
end
-- General
o.belloff = "all" -- never ring bells
o.hidden = true -- hide abandoned buffers