summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-19 21:38:33 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-19 21:38:33 +0200
commit0e6c6c5e804eb765c34610586fca6b594e90bada (patch)
tree5f95c76a712502eb2dab1787219dad70112c7c35 /fnl
parent7cf3d6d23b1e82577445a65018918f0b5c588c43 (diff)
Optimize startup
Diffstat (limited to 'fnl')
-rw-r--r--fnl/plugins/editor/dadbod.fnl2
-rw-r--r--fnl/plugins/editor/git-worktree.fnl7
-rw-r--r--fnl/plugins/editor/neo-tree.fnl2
-rw-r--r--fnl/plugins/editor/telescope.fnl12
4 files changed, 10 insertions, 13 deletions
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 "<cmd>Neotree filesystem reveal<cr>" :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 :<cmd>FindFiles<cr> :desc "Find Files"}
{1 :mg
2 "<cmd>Telescope live_grep theme=dropdown<cr>"
@@ -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