Skip to content

Commit 242d716

Browse files
committed
feat: exclude quarto docs output dir from telescope grep
1 parent 53d315d commit 242d716

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lua/plugins/ui.lua

+9
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,18 @@ return {
3737
end
3838
end)
3939
end
40+
41+
local telescope_config = require 'telescope.config'
42+
-- Clone the default Telescope configuration
43+
local vimgrep_arguments = { unpack(telescope_config.values.vimgrep_arguments) }
44+
-- I don't want to search in the `docs` directory (rendered quarto output).
45+
table.insert(vimgrep_arguments, '--glob')
46+
table.insert(vimgrep_arguments, '!docs/*')
47+
4048
telescope.setup {
4149
defaults = {
4250
buffer_previewer_maker = new_maker,
51+
vimgrep_arguments = vimgrep_arguments,
4352
file_ignore_patterns = {
4453
'node_modules',
4554
'%_files/*.html',

0 commit comments

Comments
 (0)