diff options
Diffstat (limited to 'fnl')
-rw-r--r-- | fnl/config.fnl (renamed from fnl/aktersnurra.fnl) | 0 | ||||
-rw-r--r-- | fnl/plugins/alpha.fnl | 10 | ||||
-rw-r--r-- | fnl/plugins/conform.fnl | 2 | ||||
-rw-r--r-- | fnl/plugins/grug-far.fnl | 26 | ||||
-rw-r--r-- | fnl/plugins/kulala.fnl | 41 | ||||
-rw-r--r-- | fnl/plugins/rest.fnl | 17 | ||||
-rw-r--r-- | fnl/plugins/surround.fnl | 18 | ||||
-rw-r--r-- | fnl/plugins/telescope.fnl | 36 | ||||
-rw-r--r-- | fnl/plugins/zen.fnl | 4 |
9 files changed, 94 insertions, 60 deletions
diff --git a/fnl/aktersnurra.fnl b/fnl/config.fnl index cf50b2f..cf50b2f 100644 --- a/fnl/aktersnurra.fnl +++ b/fnl/config.fnl 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/conform.fnl b/fnl/plugins/conform.fnl index b1b15ba..98963be 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] 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/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/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/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/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}} |