diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-30 11:47:23 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-30 11:55:50 +0200 |
| commit | 5a1b8b5fd5174a8d31ca9b9cb7b287dcfb004ec4 (patch) | |
| tree | 4ad7a3647f625e8ba2bb89993332f17bdc405dd7 /init.lua | |
| parent | d388fbd6cb0cdae548c1350c0b55725fcd04e53f (diff) | |
| download | nvim-config-5a1b8b5fd5174a8d31ca9b9cb7b287dcfb004ec4.tar.gz nvim-config-5a1b8b5fd5174a8d31ca9b9cb7b287dcfb004ec4.zip | |
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
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |
