summaryrefslogtreecommitdiff
path: root/fnl/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins')
-rw-r--r--fnl/plugins/alpha.fnl10
-rw-r--r--fnl/plugins/bqf.fnl2
-rw-r--r--fnl/plugins/conform.fnl4
-rw-r--r--fnl/plugins/grug-far.fnl26
-rw-r--r--fnl/plugins/harpoon.fnl2
-rw-r--r--fnl/plugins/kulala.fnl41
-rw-r--r--fnl/plugins/leap.fnl8
-rw-r--r--fnl/plugins/lsp/lspconfig.fnl2
-rw-r--r--fnl/plugins/lualine.fnl2
-rw-r--r--fnl/plugins/nvim-lint.fnl2
-rw-r--r--fnl/plugins/rest.fnl17
-rw-r--r--fnl/plugins/stay-in-place.fnl2
-rw-r--r--fnl/plugins/surround.fnl18
-rw-r--r--fnl/plugins/telescope.fnl36
-rw-r--r--fnl/plugins/textobjs.fnl2
-rw-r--r--fnl/plugins/ts-comments.fnl2
-rw-r--r--fnl/plugins/window-picker.fnl4
-rw-r--r--fnl/plugins/zen.fnl4
18 files changed, 109 insertions, 75 deletions
diff --git a/fnl/plugins/alpha.fnl b/fnl/plugins/alpha.fnl
index a989749..4011bcd 100644
--- a/fnl/plugins/alpha.fnl
+++ b/fnl/plugins/alpha.fnl
@@ -27,20 +27,20 @@
(set dashboard.section.header.val ascii-art)
(set dashboard.section.buttons.val
[(dashboard.button :f (.. (. icons :search-files) " Find file")
- ":Telescope find_files theme=ivy previewer=false<CR>")
+ ":Telescope find_files theme=dropdown previewer=false<CR>")
(dashboard.button :g (.. (. icons :search-text) " Find text")
- ":Telescope live_grep theme=ivy<CR>")
+ ":Telescope live_grep theme=dropdown<CR>")
(dashboard.button :p
(.. (. icons :search-project) " Find project")
- ":Telescope projects theme=ivy<CR>")
+ ":Telescope projects theme=dropdown<CR>")
(dashboard.button :r
(.. (. icons :recent-files)
" Recently used files")
- ":Telescope oldfiles theme=ivy previewer=false<CR>")
+ ":Telescope oldfiles theme=dropdown previewer=false<CR>")
(dashboard.button :t (.. (. icons :cog) " Configuration")
":e ~/.config/nvim/init.lua <CR>")
(dashboard.button :o (.. (. icons :org) " Org")
- ":Telescope find_files theme=ivy cwd=~/.local/share/org<CR>")])
+ ":Telescope find_files theme=dropdown cwd=~/.local/share/org<CR>")])
(set dashboard.section.header.opts.hl :AlphaHeader)
(set dashboard.section.buttons.opts.hl :AlphaButtons)
(set dashboard.opts.opts.noautocmd true)
diff --git a/fnl/plugins/bqf.fnl b/fnl/plugins/bqf.fnl
index 38afd09..8d2ea2a 100644
--- a/fnl/plugins/bqf.fnl
+++ b/fnl/plugins/bqf.fnl
@@ -24,4 +24,4 @@
:ptoggleauto :a
:ptogglemode :P}})
-{1 :kevinhwang91/nvim-bqf :event [:BufReadPost :BufNewFile] : opts}
+{1 :kevinhwang91/nvim-bqf :event :VeryLazy : opts}
diff --git a/fnl/plugins/conform.fnl b/fnl/plugins/conform.fnl
index b1b15ba..b84627d 100644
--- a/fnl/plugins/conform.fnl
+++ b/fnl/plugins/conform.fnl
@@ -17,7 +17,7 @@
:fennel [:fnlfmt]
:haskell [:fourmolu]
:html [:prettierd]
- :http [:jq]
+ :http [:jq :kulala-fmt]
:json [:jq]
:lua [:stylua]
:markdown [:prettierd]
@@ -29,4 +29,4 @@
:toml [:taplo]
:yaml [:yamlfmt]}})
-{1 :stevearc/conform.nvim : init : opts :event [:BufReadPost :BufNewFile]}
+{1 :stevearc/conform.nvim : init : opts :event :BufRead}
diff --git a/fnl/plugins/grug-far.fnl b/fnl/plugins/grug-far.fnl
index 44da9b1..fdcf897 100644
--- a/fnl/plugins/grug-far.fnl
+++ b/fnl/plugins/grug-far.fnl
@@ -11,12 +11,12 @@
(when ?cword
(set opts.prefills.search ?cword))
(when ?file
- (set opts.prefills.flags ?file))
- (grug.grug_far opts)))
+ (set opts.prefills.paths ?file))
+ (grug.open opts)))
(λ visual-replace []
(let [grug (require :grug-far)]
- (grug.with_visual_selection {:prefills {:flags (vim.fn.expand "%")}})))
+ (grug.with_visual_selection {:prefills {:paths (vim.fn.expand "%")}})))
(λ config []
(let [{: create-auto-cmds} (require :util.cmds)
@@ -24,23 +24,23 @@
(create-auto-cmds auto-cmds)
(grug.setup)))
-(local keys [{1 :<m-r> 2 :<cmd>GrugFar<cr> :desc "Find and Replace"}
- {1 :<m-w>
- 2 (λ []
- (replace (vim.fn.expand :<cword>)))
- :desc "Find and replace word under cursor"}
- {1 :<m-x>
+(local keys [{1 :<m-w> 2 :<cmd>GrugFar<cr> :desc "Find and Replace"}
+ {1 :<m-s-w>
2 (λ []
(replace nil (vim.fn.expand "%")))
:desc "Find and replace in file"}
- {1 :<m-a>
+ {1 :<m-r>
2 (λ []
- (replace (vim.fn.expand :<cword>) (vim.fn.expand "%")))
- :desc "Find and replace cword in file"}
+ (replace (vim.fn.expand :<cword>)))
+ :desc "Find and replace word under cursor"}
{1 :<m-r>
2 (λ []
(visual-replace))
:desc "Find and Replace"
- :mode [:v]}])
+ :mode [:v]}
+ {1 :<m-s-r>
+ 2 (λ []
+ (replace (vim.fn.expand :<cword>) (vim.fn.expand "%")))
+ :desc "Find and replace cword in file"}])
{1 :MagicDuck/grug-far.nvim : keys : config}
diff --git a/fnl/plugins/harpoon.fnl b/fnl/plugins/harpoon.fnl
index 62ebf17..1ae632c 100644
--- a/fnl/plugins/harpoon.fnl
+++ b/fnl/plugins/harpoon.fnl
@@ -42,6 +42,6 @@
{1 :ThePrimeagen/harpoon
:branch :harpoon2
- :event [:BufReadPost :BufNewFile]
+ :event :BufRead
: init
: keys}
diff --git a/fnl/plugins/kulala.fnl b/fnl/plugins/kulala.fnl
new file mode 100644
index 0000000..f32ed5d
--- /dev/null
+++ b/fnl/plugins/kulala.fnl
@@ -0,0 +1,41 @@
+;; Http client.
+
+(local icons (require :settings.icons))
+
+(local global_keymaps {"Send request" {1 :<leader>rs
+ 2 (λ []
+ (let [kulala (require :kulala)]
+ (kulala.run)))
+ :mode [:n :v]
+ :desc "Send request"}
+ "Send all requests" {1 :<leader>ra
+ 2 (λ []
+ (let [kulala (require :kulala)]
+ (kulala.run_all)))
+ :mode [:n :v]
+ :ft :http}
+ "Replay the last request" {1 :<leader>rr
+ 2 (λ []
+ (let [kulala (require :kulala)]
+ (kulala.replay)))
+ :ft :http}
+ "Select environment" {1 :<leader>re
+ 2 (λ []
+ (let [kulala (require :kulala)]
+ (kulala.set_selected_env)))
+ :ft :http}
+ "Manage Auth Config" {1 :<leader>ru
+ 2 (λ []
+ (let [kulala (require :kulala)]
+ (kulala.open_auth_config)))
+ :ft :http}})
+
+(local ui {:icons {:inlay {:loading (. icons :hourglass)
+ :done (. icons :checkmark)
+ :error (. icons :error)}
+ :lualine (. icons :putty)
+ :textHighlight :WarningMsg}})
+
+(local opts {: global_keymaps : ui})
+
+{1 :mistweaverco/kulala.nvim :ft :http : opts}
diff --git a/fnl/plugins/leap.fnl b/fnl/plugins/leap.fnl
index 79b94c2..5a80dbe 100644
--- a/fnl/plugins/leap.fnl
+++ b/fnl/plugins/leap.fnl
@@ -1,14 +1,14 @@
;; Leap through text.
(local dependencies [{1 :ggandor/flit.nvim
- :event [:BufReadPost :BufNewFile]
+ :event :VimEnter
:opts {:keys {:f :f :F :F :t :t :T :T}
:labeled_modes :v
:multiline true
:opts {}}}
- {1 :tpope/vim-repeat :event [:BufReadPost :BufNewFile]}
+ {1 :tpope/vim-repeat :event :VeryLazy}
{1 :ggandor/leap-spooky.nvim
- :event [:BufReadPost :BufNewFile]
+ :event :VeryLazy
:opts {;; Additional text objects, to be merged with the default ones.
;; E.g.: {'iq', 'aq'}
:extra_text_objects [:iq :aq]
@@ -38,5 +38,5 @@
{1 :ggandor/leap.nvim
: dependencies
- :event [:BufReadPost :BufNewFile]
+ :event :VeryLazy
: config}
diff --git a/fnl/plugins/lsp/lspconfig.fnl b/fnl/plugins/lsp/lspconfig.fnl
index 5cd25d4..192954c 100644
--- a/fnl/plugins/lsp/lspconfig.fnl
+++ b/fnl/plugins/lsp/lspconfig.fnl
@@ -17,7 +17,7 @@
(mason-lspconfig.setup)))
{1 :neovim/nvim-lspconfig
- :event [:BufReadPost :BufNewFile]
+ :event :BufNew
:dependencies [:mason.nvim
:williamboman/mason-lspconfig.nvim
:b0o/schemastore.nvim
diff --git a/fnl/plugins/lualine.fnl b/fnl/plugins/lualine.fnl
index b2f7e14..b22b1dc 100644
--- a/fnl/plugins/lualine.fnl
+++ b/fnl/plugins/lualine.fnl
@@ -79,6 +79,6 @@
(local dependencies [:arkav/lualine-lsp-progress])
{1 :nvim-lualine/lualine.nvim
- :event [:BufReadPost :BufNewFile]
+ :event :VeryLazy
: opts
: dependencies}
diff --git a/fnl/plugins/nvim-lint.fnl b/fnl/plugins/nvim-lint.fnl
index e2ecdc0..2d1887d 100644
--- a/fnl/plugins/nvim-lint.fnl
+++ b/fnl/plugins/nvim-lint.fnl
@@ -26,4 +26,4 @@
:yaml [:yamllint]
:zsh [:zsh]})))
-{1 :mfussenegger/nvim-lint : init : config :event [:BufReadPost :BufNewFile]}
+{1 :mfussenegger/nvim-lint : init : config :event :BufNew}
diff --git a/fnl/plugins/rest.fnl b/fnl/plugins/rest.fnl
deleted file mode 100644
index d9b1270..0000000
--- a/fnl/plugins/rest.fnl
+++ /dev/null
@@ -1,17 +0,0 @@
-;; Http client.
-
-(local keys [{1 :<leader>rr
- 2 "<cmd>Rest run<cr>"
- :desc "Run request under the cursor"}
- {1 :<localleader>rs
- 2 "<cmd>Rest run last<cr>"
- :desc "Re-run last request"}
- {1 :<localleader>rt
- 2 "<cmd>Telescope rest select_env theme=dropdown<cr>"
- :desc "Select env"}])
-
-{1 :rest-nvim/rest.nvim
- :ft :http
- : keys
- :dependencies [{1 :vhyrro/luarocks.nvim :priority 1000 :config true}
- {1 :j-hui/fidget.nvim}]}
diff --git a/fnl/plugins/stay-in-place.fnl b/fnl/plugins/stay-in-place.fnl
index de6deb7..69066d7 100644
--- a/fnl/plugins/stay-in-place.fnl
+++ b/fnl/plugins/stay-in-place.fnl
@@ -1,3 +1,3 @@
;; Keep cursor at character when indenting.
-{1 :gbprod/stay-in-place.nvim :event [:BufReadPost :BufNewFile] :config true}
+{1 :gbprod/stay-in-place.nvim :event :BufRead :config true}
diff --git a/fnl/plugins/surround.fnl b/fnl/plugins/surround.fnl
index e8fda32..2942bdb 100644
--- a/fnl/plugins/surround.fnl
+++ b/fnl/plugins/surround.fnl
@@ -1,3 +1,19 @@
;; Surround selections.
-{1 :kylechui/nvim-surround :event :InsertEnter :config true}
+(local keymaps {:insert :<C-g>s
+ :insert_line :<C-g>S
+ :normal :ys
+ :normal_cur :yss
+ :normal_line :yS
+ :normal_cur_line :ySS
+ :visual :gS
+ :visual_line :gS
+ :delete :ds
+ :change :cs
+ :change_line :cS})
+
+(λ config []
+ (let [surround (require :nvim-surround)]
+ (surround.setup {: keymaps})))
+
+{1 :kylechui/nvim-surround :event :VeryLazy : config}
diff --git a/fnl/plugins/telescope.fnl b/fnl/plugins/telescope.fnl
index 0d9df3e..0facab9 100644
--- a/fnl/plugins/telescope.fnl
+++ b/fnl/plugins/telescope.fnl
@@ -30,65 +30,59 @@
:nvim-telescope/telescope-frecency.nvim
{1 :nvim-orgmode/telescope-orgmode.nvim}])
-(local extensions [:fzf
- :frecency
- :orgmode
- :projects
- :git_worktree
- :harpoon
- :rest])
+(local extensions [:fzf :frecency :orgmode :projects :git_worktree :harpoon])
(λ load-extensions [telescope]
(each [_ extension (ipairs extensions)]
(telescope.load_extension extension)))
(local keys [{1 :mf
- 2 "<cmd>Telescope find_files theme=ivy previewer=false disable_devicons=true<cr>"
+ 2 "<cmd>Telescope find_files theme=dropdown previewer=false disable_devicons=true<cr>"
:desc "Find Files"}
{1 :mg
2 "<cmd>Telescope live_grep theme=dropdown<cr>"
:desc "Find Text"}
{1 :mb
- 2 "<cmd>Telescope buffers theme=ivy previewer=true initial_mode=normal<cr>"
+ 2 "<cmd>Telescope buffers theme=dropdown previewer=true initial_mode=normal<cr>"
:desc "Switch Buffer"}
{1 :<leader>fC
- 2 "<cmd>Telescope commands theme=ivy<cr>"
+ 2 "<cmd>Telescope commands theme=dropdown<cr>"
:desc :Commands}
{1 :<leader>fH
2 "<cmd>Telescope highlights<cr>"
:desc :Highlights}
{1 :<leader>fR
- 2 "<cmd>Telescope registers theme=ivy<cr>"
+ 2 "<cmd>Telescope registers theme=dropdown<cr>"
:desc :Registers}
{1 :<leader>fS
- 2 "<cmd>Telescope grep_string theme=ivy<cr>"
+ 2 "<cmd>Telescope grep_string theme=dropdown<cr>"
:desc "Find String"}
{1 :<leader>gb
- 2 "<cmd>Telescope git_branches theme=ivy<cr>"
+ 2 "<cmd>Telescope git_branches theme=dropdown<cr>"
:desc "Checkout Branch"}
{1 :<leader>ff
- 2 "<cmd>Telescope find_files theme=ivy<cr>"
+ 2 "<cmd>Telescope find_files theme=dropdown<cr>"
:desc "Find files"}
{1 :<leader>fh
- 2 "<cmd>Telescope help_tags theme=ivy<cr>"
+ 2 "<cmd>Telescope help_tags theme=dropdown<cr>"
:desc :Help}
{1 :<leader>fk
- 2 "<cmd>Telescope keymaps theme=ivy<cr>"
+ 2 "<cmd>Telescope keymaps theme=dropdown<cr>"
:desc :Keymaps}
{1 :<leader>fl
- 2 "<cmd>Telescope resume theme=ivy<cr>"
+ 2 "<cmd>Telescope resume theme=dropdown<cr>"
:desc "Last Search"}
{1 :<leader>fp
- 2 "<cmd>Telescope projects theme=ivy<cr>"
+ 2 "<cmd>Telescope projects theme=dropdown<cr>"
:desc "Find Project"}
{1 :<leader>fr
- 2 "<cmd>Telescope oldfiles theme=ivy previewer=false<cr>"
+ 2 "<cmd>Telescope oldfiles theme=dropdown previewer=false<cr>"
:desc "Recent File"}
{1 :<leader>ft
- 2 "<cmd>Telescope live_grep theme=ivy<cr>"
+ 2 "<cmd>Telescope live_grep theme=dropdown<cr>"
:desc "Find Text"}
{1 :<leader>gc
- 2 "<cmd>Telescope git_commits theme=ivy<cr>"
+ 2 "<cmd>Telescope git_commits theme=dropdown<cr>"
:desc "Checkout Commit"}])
(λ config []
diff --git a/fnl/plugins/textobjs.fnl b/fnl/plugins/textobjs.fnl
index 025e2b5..0f3a1e1 100644
--- a/fnl/plugins/textobjs.fnl
+++ b/fnl/plugins/textobjs.fnl
@@ -1,5 +1,5 @@
;; Various text objects.
{1 :chrisgrieser/nvim-various-textobjs
- :event [:BufReadPost :BufNewFile]
+ :event :VeryLazy
:opts {:keymaps {:useDefaults true}}}
diff --git a/fnl/plugins/ts-comments.fnl b/fnl/plugins/ts-comments.fnl
index d8ce85a..9c08fec 100644
--- a/fnl/plugins/ts-comments.fnl
+++ b/fnl/plugins/ts-comments.fnl
@@ -1,3 +1,3 @@
;; Enhance comments with treesitter.
-{1 :folke/ts-comments.nvim :opts {} :event [:BufReadPost :BufNewFile]}
+{1 :folke/ts-comments.nvim :opts {} :event :VeryLazy}
diff --git a/fnl/plugins/window-picker.fnl b/fnl/plugins/window-picker.fnl
index 41225f0..68b7786 100644
--- a/fnl/plugins/window-picker.fnl
+++ b/fnl/plugins/window-picker.fnl
@@ -1,4 +1,4 @@
-;; Trim whitespaces on save.
+;; Select buffer
(local opts {:other_win_hl_color "#171717"
:fg_color "#E1E1E1"
@@ -16,4 +16,4 @@
(vim.keymap.set :n :mw (λ []
(pick-window)) {})))
-{1 :s1n7ax/nvim-window-picker :event [:BufReadPost :BufNewFile] :version :2.0.0 : config}
+{1 :s1n7ax/nvim-window-picker :event :VeryLazy :version :2.0.0 : config}
diff --git a/fnl/plugins/zen.fnl b/fnl/plugins/zen.fnl
index fcaf114..caa7313 100644
--- a/fnl/plugins/zen.fnl
+++ b/fnl/plugins/zen.fnl
@@ -1,8 +1,8 @@
;; Zen mode.
-(local opts {:window {:backdrop 1
+(local opts {:window {:backdrop 0.98
:height 1
- :width 128
+ :width 120
:options {:signcolumn :no
:number false
:relativenumber false}}