Skip to content

Commit

Permalink
feat: exclude quarto docs output dir from telescope grep
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Apr 9, 2024
1 parent 53d315d commit 242d716
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ return {
end
end)
end

local telescope_config = require 'telescope.config'
-- Clone the default Telescope configuration
local vimgrep_arguments = { unpack(telescope_config.values.vimgrep_arguments) }
-- I don't want to search in the `docs` directory (rendered quarto output).
table.insert(vimgrep_arguments, '--glob')
table.insert(vimgrep_arguments, '!docs/*')

telescope.setup {
defaults = {
buffer_previewer_maker = new_maker,
vimgrep_arguments = vimgrep_arguments,
file_ignore_patterns = {
'node_modules',
'%_files/*.html',
Expand Down

0 comments on commit 242d716

Please sign in to comment.