;; Telescope a highly extendable fuzzy finder over lists. (local dependencies [:nvim-lua/popup.nvim :nvim-telescope/telescope-frecency.nvim {1 :nvim-telescope/telescope-fzf-native.nvim :build :make} :tami5/sqlite.lua {1 :ahmedkhalf/project.nvim :event :VeryLazy :opts {:active true :on_config_done nil :manual_mode false :detection_methods [:patterns] :patterns [:git :_darcs :.hg :.bzr :.svn :Makefile :package.json] :show_hidden false :silent_chdir true :ignore_lsp {} :datapath (vim.fn.stdpath :data)} :config (λ [_ opts] (let [project (require :project_nvim)] (project.setup opts)))} :nvim-lua/plenary.nvim :nvim-telescope/telescope-fzf-native.nvim :nvim-telescope/telescope-frecency.nvim {1 :nvim-orgmode/telescope-orgmode.nvim}]) (local extensions [:fzf :frecency :orgmode :projects :git_worktree :harpoon :rest]) (λ load-extensions [telescope] (each [_ extension (ipairs extensions)] (telescope.load_extension extension))) (λ telescope-builtin [builtin opts] (let [telescope (require :telescope.builtin) themes (require :telescope.themes) theme (. opts :theme)] ((. telescope builtin) ((. themes theme) opts)))) (local user-cmds [[:FindFiles (λ [] (telescope-builtin :find_files {:theme :get_ivy :previewer false})) {:nargs 0}]]) (λ init [] (let [{: create-user-cmds} (require :util.cmds)] (create-user-cmds user-cmds))) (local keys [{1 :mf 2 :FindFiles :desc "Find Files"} {1 :mg 2 "Telescope live_grep theme=ivy" :desc "Find Text"} {1 : 2 "Telescope buffers theme=ivy previewer=true initial_mode=normal" :desc "Switch Buffer"} {1 :fC 2 "Telescope commands theme=ivy" :desc :Commands} {1 :fH 2 "Telescope highlights" :desc :Highlights} {1 :fR 2 "Telescope registers theme=ivy" :desc :Registers} {1 :fS 2 "Telescope grep_string theme=ivy" :desc "Find String"} {1 :gb 2 "Telescope git_branches theme=ivy" :desc "Checkout Branch"} {1 :ff 2 :FindFiles :desc "Find files"} {1 :fh 2 "Telescope help_tags theme=ivy" :desc :Help} {1 :fk 2 "Telescope keymaps theme=ivy" :desc :Keymaps} {1 :fl 2 "Telescope resume theme=ivy" :desc "Last Search"} {1 :fp 2 "Telescope projects theme=ivy" :desc "Find Project"} {1 :fr 2 "Telescope oldfiles theme=ivy" :desc "Recent File"} {1 :ft 2 "Telescope live_grep theme=ivy" :desc "Find Text"} {1 :gc 2 "Telescope git_commits theme=ivy" :desc "Checkout Commit"}]) (λ config [] (let [telescope (require :telescope) actions (require :telescope.actions) icons (require :settings.icons)] (telescope.setup {:defaults {:prompt_prefix (.. " " (. icons :telescope) " ") :selection_caret (.. (. icons :caret) " ") :path_display [:smart] :color_devicons false :pickers {:find_files {:theme :dropdown}} :vimgrep_arguments [:rg :--color=never :--no-heading :--with-filename :--line-number :--column :--smart-case :--hidden] :mappings {:i {: actions.cycle_history_next : actions.cycle_history_prev : actions.move_selection_next : actions.move_selection_previous : actions.close : actions.move_selection_next : actions.move_selection_previous : actions.select_default : actions.select_horizontal : actions.select_vertical : actions.select_tab : actions.preview_scrolling_up : actions.preview_scrolling_down : actions.results_scrolling_up : actions.results_scrolling_down : (+ actions.toggle_selection actions.move_selection_worse) : (+ actions.toggle_selection actions.move_selection_better) : (+ actions.send_to_qflist actions.open_qflist) : (+ actions.send_selected_to_qflist actions.open_qflist) : actions.complete_tag : actions.which_key} :n {: actions.close : actions.select_default : actions.select_horizontal : actions.select_vertical : actions.select_tab : (+ actions.toggle_selection actions.move_selection_worse) : (+ actions.toggle_selection actions.move_selection_better) : (+ actions.send_to_qflist actions.open_qflist) : (+ actions.send_selected_to_qflist actions.open_qflist) :j actions.move_selection_next :k actions.move_selection_previous :H actions.move_to_top :M actions.move_to_middle :L actions.move_to_bottom : actions.move_selection_next : actions.move_selection_previous :gg actions.move_to_top :G actions.move_to_bottom :q actions.close : actions.preview_scrolling_up : actions.preview_scrolling_down : actions.results_scrolling_up : actions.results_scrolling_down :dd actions.delete_buffer :? actions.which_key}}} :extensions {:fzf {:fuzzy true :override_generic_sorter true :override_file_sorter true :case_mode :smart_case}}}) (load-extensions telescope))) {1 :nvim-telescope/telescope.nvim :cmd :Telescope : init : config : dependencies : keys}