From 5a1b8b5fd5174a8d31ca9b9cb7b287dcfb004ec4 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Tue, 30 Jun 2026 11:47:23 +0200 Subject: feat(cmdline): recursive :find, ripgrep :grep, quiet grep menu - path+=** so :find searches subdirectories recursively - grepprg/grepformat drive :grep through ripgrep (--vimgrep --smart-case), with a comment on the -./-uu/-uuu opt-in flags - the auto-completion menu skips grep-family commands while their search-pattern argument is being typed, and dismisses any menu left over from completing the command name --- init.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 982e6d4..42ce4ba 100644 --- a/init.lua +++ b/init.lua @@ -245,6 +245,13 @@ vim.opt.cursorline = true -- Highlight the line where the cursor is on vim.opt.scrolloff = 2 -- Keep this many visible screen lines above/below the cursor vim.opt.ignorecase = true -- Search ignores case by default vim.opt.smartcase = true -- Search is case-sensitive if searching for uppercase characters +-- `:grep` via ripgrep, respecting `.gitignore` and skipping hidden/binary files by default. +-- `:grep {args}` appends to `grepprg`, so opt into a wider search per-invocation: +-- `-.` also search hidden files (e.g. dotfiles), still skipping `.gitignore`d paths +-- `-uu` also search hidden and `.gitignore`d files (descends into `.git/` too) +-- `-uuu` `-uu` plus binary files +vim.opt.grepprg = "rg --vimgrep --smart-case" +vim.opt.grepformat = "%f:%l:%c:%m" vim.opt.conceallevel = 2 -- Hide text with the "conceal" syntax attribute vim.opt.showtabline = 2 -- Always show tabline vim.opt.winborder = "rounded" -- Rounded outline for floating windows -- cgit v1.3.1