diff options
Diffstat (limited to 'fnl/plugins')
-rw-r--r-- | fnl/plugins/alpha.fnl | 10 | ||||
-rw-r--r-- | fnl/plugins/grug-far.fnl | 26 | ||||
-rw-r--r-- | fnl/plugins/surround.fnl | 18 | ||||
-rw-r--r-- | fnl/plugins/telescope.fnl | 28 | ||||
-rw-r--r-- | fnl/plugins/zen.fnl | 4 |
5 files changed, 51 insertions, 35 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/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/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..da692db 100644 --- a/fnl/plugins/telescope.fnl +++ b/fnl/plugins/telescope.fnl @@ -43,52 +43,52 @@ (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/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}} |