summaryrefslogtreecommitdiff
path: root/fnl/plugins/editor
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-23 22:04:59 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-23 22:04:59 +0200
commit6dcd88cde5825573a3732e8b18f7d663ca47495b (patch)
tree10edd9981f7d26afa0dd86ad7fa8e1c37db34e5b /fnl/plugins/editor
parentcc8adce9d8a7dd63bc639b3e2d3e71d82ee1713f (diff)
Rename setup to config
Diffstat (limited to 'fnl/plugins/editor')
-rw-r--r--fnl/plugins/editor/alpha.fnl14
-rw-r--r--fnl/plugins/editor/cmp.fnl5
-rw-r--r--fnl/plugins/editor/leap.fnl5
-rw-r--r--fnl/plugins/editor/treesitter.fnl5
-rw-r--r--fnl/plugins/editor/which-key.fnl10
5 files changed, 16 insertions, 23 deletions
diff --git a/fnl/plugins/editor/alpha.fnl b/fnl/plugins/editor/alpha.fnl
index c9dce50..c933a99 100644
--- a/fnl/plugins/editor/alpha.fnl
+++ b/fnl/plugins/editor/alpha.fnl
@@ -21,7 +21,7 @@
" ..... "
" . "])
-(fn setup []
+(fn config []
(let [alpha (require :alpha)]
(let [dashboard (require :alpha.themes.dashboard)]
(set dashboard.section.header.val ascii-art)
@@ -30,9 +30,12 @@
":Telescope find_files theme=dropdown<CR>")
(dashboard.button :g (.. (. icons :search-text) " Find text")
":Telescope live_grep theme=dropdown<CR>")
- (dashboard.button :p (.. (. icons :search-project) " Find project")
+ (dashboard.button :p
+ (.. (. icons :search-project) " Find project")
":Telescope projects theme=dropdown<CR>")
- (dashboard.button :r (.. (. icons :recent-files) " Recently used files")
+ (dashboard.button :r
+ (.. (. icons :recent-files)
+ " Recently used files")
":Telescope oldfiles theme=dropdown<CR>")
(dashboard.button :t (.. (. icons :cog) " Configuration")
":e ~/.config/nvim/init.lua <CR>")
@@ -43,7 +46,4 @@
(set dashboard.opts.opts.noautocmd true)
(alpha.setup dashboard.opts))))
-{1 :goolord/alpha-nvim
- :event :VimEnter
- :config (fn []
- (setup))}
+{1 :goolord/alpha-nvim :event :VimEnter : config}
diff --git a/fnl/plugins/editor/cmp.fnl b/fnl/plugins/editor/cmp.fnl
index 8eba613..c0ad52a 100644
--- a/fnl/plugins/editor/cmp.fnl
+++ b/fnl/plugins/editor/cmp.fnl
@@ -1,6 +1,6 @@
;; Configuration for completion plugin.
-(fn setup []
+(fn config []
(let [cmp (require :cmp)
lspkind (require :lspkind)
luasnip (require :luasnip)
@@ -64,5 +64,4 @@
:saadparwaiz1/cmp_luasnip
:f3fora/cmp-spell]
:event :InsertEnter
- :config (fn []
- (setup))}
+ : config}
diff --git a/fnl/plugins/editor/leap.fnl b/fnl/plugins/editor/leap.fnl
index 6c2eb53..f6d820e 100644
--- a/fnl/plugins/editor/leap.fnl
+++ b/fnl/plugins/editor/leap.fnl
@@ -1,6 +1,6 @@
;; Leap through text.
-(fn setup []
+(fn config []
(let [leap (require :leap)]
(leap.setup {})
(leap.set_default_keymaps)))
@@ -13,5 +13,4 @@
:multiline true
:opts {}}}
:event :BufReadPost
- :config (fn []
- (setup))}
+ : config}
diff --git a/fnl/plugins/editor/treesitter.fnl b/fnl/plugins/editor/treesitter.fnl
index b88b4bf..b0d9c60 100644
--- a/fnl/plugins/editor/treesitter.fnl
+++ b/fnl/plugins/editor/treesitter.fnl
@@ -75,7 +75,7 @@
:goto_next {"]i" "@conditional.outer"}
:goto_previous {"[i" "@conditional.outer"}}}})
-(fn setup []
+(fn config []
(let [treesitter (require :nvim-treesitter.configs)]
(treesitter.setup opts)))
@@ -83,5 +83,4 @@
:dependencies [{1 :nvim-treesitter/nvim-treesitter-textobjects}]
:build ":TSUpdate"
:event :VeryLazy
- :config (fn []
- (setup))}
+ : config}
diff --git a/fnl/plugins/editor/which-key.fnl b/fnl/plugins/editor/which-key.fnl
index 84197d7..962183e 100644
--- a/fnl/plugins/editor/which-key.fnl
+++ b/fnl/plugins/editor/which-key.fnl
@@ -37,15 +37,11 @@
:<leader>o {:name :+orgmode}
:<leader>r {:name :+replace}
:<leader>s {:name :+session}
- :<leader>w {:name :+worktree}
- })
+ :<leader>w {:name :+worktree}})
-(fn setup []
+(fn config []
(let [which-key (require :which-key)]
(which-key.setup opts)
(which-key.register groups)))
-{1 :folke/which-key.nvim
- :event :VeryLazy
- :config (fn []
- (setup))}
+{1 :folke/which-key.nvim :event :VeryLazy : config}