diff --git a/config/nvim/nifoc/keymap.fnl b/config/nvim/nifoc/keymap.fnl index 43abdb1..60a0c68 100644 --- a/config/nvim/nifoc/keymap.fnl +++ b/config/nvim/nifoc/keymap.fnl @@ -19,8 +19,7 @@ (set vim.g.mapleader " ") (set vim.opt.timeoutlen 400) ;; Leader Mappings - (keymap.set :n :o telescope-nifoc.project-files - {:desc "Find Files"}) + (keymap.set :n :o telescope-nifoc.find-files {:desc "Find Files"}) (keymap.set :n :s #(telescope-builtin.live_grep telescope-ivy) {:desc "Live Grep"}) (keymap.set :n :fn :enew {:desc "New File"}) diff --git a/config/nvim/nifoc/telescope.fnl b/config/nvim/nifoc/telescope.fnl index 17c5cb3..a6314f1 100644 --- a/config/nvim/nifoc/telescope.fnl +++ b/config/nvim/nifoc/telescope.fnl @@ -1,19 +1,23 @@ (let [mod {} builtin (require :telescope.builtin) themes (require :telescope.themes)] - (fn mod.project-files [] - (let [git-opts (themes.get_ivy) - find-opts (themes.get_ivy {:find_command [:rg + (fn mod.find-files [] + (let [find-opts (themes.get_ivy {:find_command [:rg :--files :--hidden + :--ignore-vcs :-L :-g :!.git/* :-g - :!node_modules/*]}) + :!node_modules/*]})] + (builtin.find_files find-opts))) + + (fn mod.project-files [] + (let [git-opts (themes.get_ivy) ok? (pcall builtin.git_files git-opts)] (when (not ok?) - (builtin.find_files find-opts)))) + (mod.find-files)))) mod) diff --git a/config/nvim/plugins/telescope.fnl b/config/nvim/plugins/telescope.fnl index 12c9462..9a83efe 100644 --- a/config/nvim/plugins/telescope.fnl +++ b/config/nvim/plugins/telescope.fnl @@ -10,7 +10,16 @@ :layout_strategy :horizontal :layout_config {:horizontal {:preview_width 0.5}} ; Mappings - :mappings {:i {: actions.close}}} + :mappings {:i {: actions.close}} + ; Arguments + :vimgrep_arguments [:rg + :--color=never + :--no-heading + :--with-filename + :--line-number + :--column + :--smart-case + :--trim]} :extensions {:ui-select [(themes.get_dropdown {})]}}) (telescope.load_extension :ui-select) (telescope.load_extension :toggleterm)