From 0e6c6c5e804eb765c34610586fca6b594e90bada Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 19 Sep 2023 21:38:33 +0200 Subject: Optimize startup --- fnl/plugins/editor/dadbod.fnl | 2 +- fnl/plugins/editor/git-worktree.fnl | 7 +------ fnl/plugins/editor/neo-tree.fnl | 2 +- fnl/plugins/editor/telescope.fnl | 12 +++++++----- 4 files changed, 10 insertions(+), 13 deletions(-) (limited to 'fnl/plugins') diff --git a/fnl/plugins/editor/dadbod.fnl b/fnl/plugins/editor/dadbod.fnl index aec3afb..cc6fa64 100644 --- a/fnl/plugins/editor/dadbod.fnl +++ b/fnl/plugins/editor/dadbod.fnl @@ -16,7 +16,7 @@ :ft [:sql :plsql] :lazy true}] : keys - :event :VeryLazy + ; :event :VeryLazy :init (fn [] (set vim.g.db_ui_use_nerd_fonts 1) (set vim.g.db_ui_winwidth 40) diff --git a/fnl/plugins/editor/git-worktree.fnl b/fnl/plugins/editor/git-worktree.fnl index 508d42a..ec57195 100644 --- a/fnl/plugins/editor/git-worktree.fnl +++ b/fnl/plugins/editor/git-worktree.fnl @@ -9,9 +9,4 @@ :mode :n :desc "Create a worktree"}]) -{1 :ThePrimeagen/git-worktree.nvim - :event :VeryLazy - : keys - :init (fn [] - (let [telescope (require :telescope)] - (telescope.load_extension :git_worktree)))} +{1 :ThePrimeagen/git-worktree.nvim : keys} diff --git a/fnl/plugins/editor/neo-tree.fnl b/fnl/plugins/editor/neo-tree.fnl index c56093f..5cef558 100644 --- a/fnl/plugins/editor/neo-tree.fnl +++ b/fnl/plugins/editor/neo-tree.fnl @@ -42,7 +42,7 @@ {1 :nvim-neo-tree/neo-tree.nvim :keys [{1 "-" 2 "Neotree filesystem reveal" :desc "Open Neotree"}] - :event :VeryLazy + ; :event :VeryLazy :cmd :Neotree : init : deactivate diff --git a/fnl/plugins/editor/telescope.fnl b/fnl/plugins/editor/telescope.fnl index dafb48c..8f2bff3 100644 --- a/fnl/plugins/editor/telescope.fnl +++ b/fnl/plugins/editor/telescope.fnl @@ -1,5 +1,11 @@ ;; Telescope a highly extendable fuzzy finder over lists. +(local extensions [:fzf :frecency :orgmode :projects :git_worktree :harpoon]) + +(fn load-extensions [telescope] + (each [_ extension (ipairs extensions)] + (telescope.load_extension extension))) + (local keys [{1 :mf 2 :FindFiles :desc "Find Files"} {1 :mg 2 "Telescope live_grep theme=dropdown" @@ -130,11 +136,7 @@ :override_generic_sorter true :override_file_sorter true :case_mode :smart_case}}}) - (telescope.load_extension :fzf) - (telescope.load_extension :frecency) - (telescope.load_extension :orgmode) - (telescope.load_extension :projects) - (telescope.load_extension :harpoon))) + (load-extensions telescope))) {1 :nvim-telescope/telescope.nvim :cmd :Telescope -- cgit v1.2.3-70-g09d2