diff options
Diffstat (limited to 'fnl/config')
-rw-r--r-- | fnl/config/autocmd.fnl | 3 | ||||
-rw-r--r-- | fnl/config/flit.fnl | 9 | ||||
-rw-r--r-- | fnl/config/hop.fnl | 40 | ||||
-rw-r--r-- | fnl/config/init.fnl | 4 | ||||
-rw-r--r-- | fnl/config/leap.fnl | 19 | ||||
-rw-r--r-- | fnl/config/lualine.fnl | 5 | ||||
-rw-r--r-- | fnl/config/minibar.fnl | 1 | ||||
-rw-r--r-- | fnl/config/nvim-tree.fnl | 67 | ||||
-rw-r--r-- | fnl/config/which-key.fnl | 33 |
9 files changed, 48 insertions, 133 deletions
diff --git a/fnl/config/autocmd.fnl b/fnl/config/autocmd.fnl index 40eb338..017792f 100644 --- a/fnl/config/autocmd.fnl +++ b/fnl/config/autocmd.fnl @@ -3,9 +3,6 @@ (defn create-autocmd [event opts] (nvim.create_autocmd event opts)) -(create-autocmd :BufEnter - {:command "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif"}) - (create-autocmd :FileType {:pattern [:qf :help :man :lspinfo] :command "nnoremap <silent> <buffer> q :close<CR>"}) diff --git a/fnl/config/flit.fnl b/fnl/config/flit.fnl new file mode 100644 index 0000000..10e103d --- /dev/null +++ b/fnl/config/flit.fnl @@ -0,0 +1,9 @@ +;; fFtT motions on roids. +(module config.flit {autoload {: util nvim aniseed.nvim}}) + +(def- opts {:keys {:f :f :F :F :t :t :T :T} + :labeled_modes :v + :multiline true + :opts {}}) + +(util.use-config :flit opts) diff --git a/fnl/config/hop.fnl b/fnl/config/hop.fnl deleted file mode 100644 index 7bba398..0000000 --- a/fnl/config/hop.fnl +++ /dev/null @@ -1,40 +0,0 @@ -;; Hopping in text. -(module config.hop {autoload {: util nvim aniseed.nvim}}) - -(util.use-config :hop {}) - -(def- opts {:noremap true :silent true}) - -(nvim.set_keymap :n :ms ":HopChar2<cr>" {:silent true}) -(nvim.set_keymap :n :mS ":HopWord<cr>" {:silent true}) -(nvim.set_keymap :o :f - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<CR>" - opts) - -(nvim.set_keymap :o :F - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<CR>" - opts) - -(nvim.set_keymap :o :t - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })<CR>" - opts) - -(nvim.set_keymap :o :T - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })<CR>" - opts) - -(nvim.set_keymap :n :f - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<CR>" - opts) - -(nvim.set_keymap :n :F - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<CR>" - opts) - -(nvim.set_keymap :n :t - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })<CR>" - opts) - -(nvim.set_keymap :n :T - ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })<CR>" - opts) diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index b752361..059a42b 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -11,15 +11,15 @@ config.comment config.diffview config.fidget + config.flit config.gitsigns config.harpoon - config.hop + config.leap config.lir config.lsp config.lualine config.minibar config.neogit - config.nvim-tree config.orgmode config.project config.spectre diff --git a/fnl/config/leap.fnl b/fnl/config/leap.fnl new file mode 100644 index 0000000..cb6a267 --- /dev/null +++ b/fnl/config/leap.fnl @@ -0,0 +1,19 @@ +;; Leap through text. +(module config.leap {autoload {: util nvim aniseed.nvim}}) + +(def- opts {:max_aot_targets nil + :highlight_unlabeled false + :max_highlighted_traversal_targets 10 + :case_sensitive false + :equivalence_classes [" \t\r\n"] + :substitute_chars [] + :special_keys {:repeat_search :<enter> + :next_aot_match :<enter> + :next_match [";" :<enter>] + :prev_match ["," :<tab>] + :next_group :<space> + :prev_group :<tab>}}) + +(let [leap (util.load-plugin :leap)] + (leap.setup opts) + (leap.set_default_keymaps)) diff --git a/fnl/config/lualine.fnl b/fnl/config/lualine.fnl index 7701915..d098966 100644 --- a/fnl/config/lualine.fnl +++ b/fnl/config/lualine.fnl @@ -8,7 +8,7 @@ :NeogitStatus :NeogitCommitMessage]) -(def- ignore [:help :NvimTree :packer :spectre_panel :TelescopePrompt]) +(def- ignore [:help :packer :spectre_panel :TelescopePrompt]) (defn- active-clients [] (let [clients (vim.lsp.buf_get_clients) client_names []] @@ -58,8 +58,7 @@ :disabled_filetypes disable :ignore_focus ignore :always_divide_middle true - :globalstatus true - :refresh {:statusline 50}} + :globalstatus true} :sections {:lualine_a [:mode] :lualine_b [branch diff] :lualine_c {} diff --git a/fnl/config/minibar.fnl b/fnl/config/minibar.fnl index f8c0a30..fddb71c 100644 --- a/fnl/config/minibar.fnl +++ b/fnl/config/minibar.fnl @@ -6,7 +6,6 @@ :dashboard :packer :neogitstatus - :NvimTree :Trouble :alpha :lir diff --git a/fnl/config/nvim-tree.fnl b/fnl/config/nvim-tree.fnl deleted file mode 100644 index 097ae47..0000000 --- a/fnl/config/nvim-tree.fnl +++ /dev/null @@ -1,67 +0,0 @@ -;; A vertical sidebar file explorer. -(module config.nvim-tree {autoload {: util nvim aniseed.nvim}}) - -(let [nvim-tree (util.load-plugin :nvim-tree) - nvim-tree-config (util.load-plugin :nvim-tree.config)] - (let [tree-cb nvim-tree-config.nvim_tree_callback] - (nvim-tree.setup {:auto_reload_on_write true - :disable_netrw false - :hijack_cursor false - :hijack_netrw true - :filesystem_watchers {:enable true :debounce_delay 100} - :hijack_unnamed_buffer_when_opening false - :ignore_buffer_on_setup false - :open_on_setup false - :open_on_tab false - :sort_by :name - :update_cwd true - :view {:width 30 - :side :left - :preserve_window_proportions false - :number false - :hide_root_folder false - :relativenumber false - :signcolumn :yes - :mappings {:custom_only false - :list [{:key [:l :<CR> :o] - :cb (tree_cb :edit)} - {:key :h - :cb (tree_cb :close_node)} - {:key :v :cb (tree_cb :vsplit)}]}} - :renderer {:icons {:webdev_colors false}} - :hijack_directories {:enable false} - :update_focused_file {:enable true - :update_cwd true - :ignore_list {}} - :ignore_ft_on_setup [:startify :dashboard :alpha] - :system_open {:cmd nil :args {}} - :diagnostics {:enable true - :show_on_dirs false - :icons {:hint "" - :info "" - :warning "" - :error ""}} - :filters {:dotfiles false :custom {} :exclude {}} - :git {:enable true :ignore true :timeout 400} - :actions {:change_dir {:enable true :global false} - :open_file {:quit_on_open false - :resize_window false - :window_picker {:enable true - :chars :ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 - :exclude {:filetype [:notify - :packer - :qf - :diff - :fugitive - :fugitiveblame] - :buftype [:nofile - :terminal - :help]}}}} - :trash {:cmd :trash :require_confirm true} - :log {:enable false - :truncate false - :types {:all false - :config false - :copy_paste false - :git false - :profile false}}}))) diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index 1d196fa..148ee29 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -40,7 +40,7 @@ :b ["<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{sort_lastused = true, initial_mode = 'normal', previewer = false})<cr>" "Switch buffers"] :d [:<cmd>TroubleToggle<cr> :Trouble] - :D ["<cmd>Telescope diagnostics<cr>" "Telescope diagnostics"] + :D ["<cmd>Telescope diagnostics theme=dropdown<cr>" "Telescope diagnostics"] :f ["<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>" "Find files"] :g ["<cmd>Telescope live_grep theme=ivy<cr>" "Find text"] @@ -48,11 +48,12 @@ "Harpoon Next"] :h ["<cmd>lua require('harpoon.ui').nav_prev()<cr>" "Harpoon Prev"] - :t ["<cmd>Telescope harpoon marks<cr>" "Search Files"] + :t ["<cmd>Telescope harpoon marks theme=dropdown<cr>" "Search Files"] :v ["<cmd>lua vim.lsp.buf.rename()<cr>" :Rename] - :p ["<cmd>SaveSession<cr>" "Save Session"] + :p [:<cmd>SaveSession<cr> "Save Session"] :r ["<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>" - "Harpoon UI"]}) + "Harpoon UI"] + :n [:<cmd>Neogit<cr> :Neogit]}) (def- nopts {:mode :n :prefix :<leader> @@ -62,24 +63,24 @@ :nowait true}) (def- find {:name :Find - :b ["<cmd>Telescope git_branches<cr>" "Checkout branch"] - :c ["<cmd>Telescope colorscheme<cr>" :Colorscheme] + :b ["<cmd>Telescope git_branches theme=dropdown<cr>" "Checkout branch"] + :c ["<cmd>Telescope colorscheme theme=dropdown<cr>" :Colorscheme] :f ["<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>" "Find files"] :t ["<cmd>Telescope live_grep theme=ivy<cr>" "Find text"] - :s ["<cmd>Telescope grep_string<cr>" "Find String"] + :s ["<cmd>Telescope grep_string theme=dropdown<cr>" "Find String"] :h ["<cmd>Telescope help_tags<cr>" :Help] :H ["<cmd>Telescope highlights<cr>" :Highlights] :l ["<cmd>Telescope resume<cr>" "Last Search"] :M ["<cmd>Telescope man_pages<cr>" "Man Pages"] - :r ["<cmd>Telescope oldfiles<cr>" "Recent File"] + :r ["<cmd>Telescope oldfiles theme=dropdown<cr>" "Recent File"] :R ["<cmd>Telescope registers<cr>" :Registers] :k ["<cmd>Telescope keymaps<cr>" :Keymaps] :C ["<cmd>Telescope commands<cr>" :Commands]}) (def- git {:name :Git - :d ["<cmd>DiffviewOpen<cr>" "Diffview"] - :D ["<cmd>DiffviewFileHistory<cr>" "DiffviewFileHistory"] + :d ["<cmd>Gitsigns diffthis HEAD<cr>" :Diff] + :D [:<cmd>DiffviewFileHistory<cr> :DiffviewFileHistory] :j ["<cmd>lua require 'gitsigns'.next_hunk()<cr>" "Next Hunk"] :k ["<cmd>lua require 'gitsigns'.prev_hunk()<cr>" "Prev Hunk"] :l ["<cmd>lua require 'gitsigns'.blame_line()<cr>" :Blame] @@ -89,11 +90,10 @@ :s ["<cmd>lua require 'gitsigns'.stage_hunk()<cr>" "Stage Hunk"] :u ["<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>" "Undo Stage Hunk"] - :o ["<cmd>Telescope git_status<cr>" "Open changed file"] - :b ["<cmd>Telescope git_branches<cr>" "Checkout branch"] - :c ["<cmd>Telescope git_commits<cr>" "Checkout commit"] - :d ["<cmd>Gitsigns diffthis HEAD<cr>" :Diff] - :n [:<cmd>Neogit<cr> :Neogit]}) + :o ["<cmd>Telescope git_status theme=dropdown<cr>" "Open changed file"] + :b ["<cmd>Telescope git_branches theme=dropdown<cr>" "Checkout branch"] + :c ["<cmd>Telescope git_commits theme=dropdown<cr>" "Checkout commit"] + :d ["<cmd>Gitsigns diffthis HEAD<cr>" :Diff]}) (def- lsp {:name :LSP :a ["<cmd>lua vim.lsp.buf.code_action()<cr>" "Code Action"] @@ -134,10 +134,9 @@ (if (not= win nil) (nvim.set_current_win win))))) -(def- nmappings {:a ["<cmd>Telescope lsp_document_symbols<cr>" +(def- nmappings {:a ["<cmd>Telescope lsp_document_symbols theme=dropdown<cr>" "Document Symbols"] :c [:<cmd>Bdelete!<CR> "Close Buffer"] - :e [:<cmd>NvimTreeToggle<cr> :Explorer] :f find :g git :h [:<cmd>Alpha<cr> :Alpha] |