From 2fb74089d3515077395299bce9df32e9e989a8ac Mon Sep 17 00:00:00 2001 From: sefidel Date: Wed, 16 Feb 2022 08:54:25 +0900 Subject: rel: v0.1 - Disable lazy-loading plugins - Add more useful plugins - Fix bar from loading slowly - Add support for neomutt - Change keybinds - Add Editorconfig --- fnl/nvrc/packs/diffview.fnl | 7 +++++++ fnl/nvrc/packs/filetype.fnl | 3 +++ fnl/nvrc/packs/harpoon.fnl | 3 +++ fnl/nvrc/packs/mergetool.fnl | 7 +++++++ fnl/nvrc/packs/nvimtree.fnl | 44 ------------------------------------------- fnl/nvrc/packs/treesitter.fnl | 22 ++++++++++++++++------ 6 files changed, 36 insertions(+), 50 deletions(-) create mode 100644 fnl/nvrc/packs/diffview.fnl create mode 100644 fnl/nvrc/packs/filetype.fnl create mode 100644 fnl/nvrc/packs/harpoon.fnl create mode 100644 fnl/nvrc/packs/mergetool.fnl delete mode 100644 fnl/nvrc/packs/nvimtree.fnl (limited to 'fnl/nvrc/packs') diff --git a/fnl/nvrc/packs/diffview.fnl b/fnl/nvrc/packs/diffview.fnl new file mode 100644 index 0000000..a32dea5 --- /dev/null +++ b/fnl/nvrc/packs/diffview.fnl @@ -0,0 +1,7 @@ +(local {: setup} (require :diffview)) + +(setup {:enhanced_diff_hl true + :use_icons false + :key_bindings {:file_panel {:q "DiffviewClose"} + :file_history_panel {:q "DiffviewClose"} + :view {:q "DiffviewClose"}}}) diff --git a/fnl/nvrc/packs/filetype.fnl b/fnl/nvrc/packs/filetype.fnl new file mode 100644 index 0000000..d24d322 --- /dev/null +++ b/fnl/nvrc/packs/filetype.fnl @@ -0,0 +1,3 @@ +(local {: setup} (require :filetype)) + +(setup {:overrides {:complex {:.*neomutt-.* :mail}}}) diff --git a/fnl/nvrc/packs/harpoon.fnl b/fnl/nvrc/packs/harpoon.fnl new file mode 100644 index 0000000..073f406 --- /dev/null +++ b/fnl/nvrc/packs/harpoon.fnl @@ -0,0 +1,3 @@ +(local {: setup} (require :harpoon)) + +(setup {:save_on_toggle true}) diff --git a/fnl/nvrc/packs/mergetool.fnl b/fnl/nvrc/packs/mergetool.fnl new file mode 100644 index 0000000..5a8cfba --- /dev/null +++ b/fnl/nvrc/packs/mergetool.fnl @@ -0,0 +1,7 @@ +(import-macros {: setv!} :nvrc.macro.set) + +(setv! MergetoolSetLayoutCallback + (fn [split] + (when (and (= "mr,b" (. split :layout)) (= :b (. split :split))) + (set vim.wo.diff false) + (vim.cmd "resize 15")))) diff --git a/fnl/nvrc/packs/nvimtree.fnl b/fnl/nvrc/packs/nvimtree.fnl deleted file mode 100644 index 83326ea..0000000 --- a/fnl/nvrc/packs/nvimtree.fnl +++ /dev/null @@ -1,44 +0,0 @@ -(import-macros {: setv!} :nvrc.macro.set) -(local {: setup} (require :nvim-tree)) - -(setv! nvim_tree_add_trailing 0) -(setv! nvim_tree_git_hl 1) -(setv! nvim_tree_highlight_opened_files 0) -(setv! nvim_tree_indent_markers 1) -(setv! nvim_tree_quit_on_open 0) -(setv! nvim_tree_root_folder_modifier - (table.concat {1 ":t:gs?$?/.." 2 (string.rep " " 1000) 3 "?:gs?^??"})) -(setv! nvim_tree_window_picker_exclude - {:filetype {1 :notify 2 :packer 3 :qf} :buftype {1 :terminal}}) - -(setv! nvim_tree_show_icons {:folders 0 :files 0 :git 0 :folder_arrows 0}) - -; Nvimtree still shows folder icon despite folders being disabled -; Maybe the nvim_tree_show_icons option isn't really working? -(setv! nvim_tree_symlink_arrow " -> ") -(setv! nvim_tree_icons {:default "" - :symlink "~" - :git {:deleted :x - :ignored "?" - :renamed "->" - :staged "*" - :unmerged "!" - :unstaged "!" - :untracked "!"} - :folder {:default "+" - :empty "?" - :empty_open "-" - :open "-" - :symlink "~" - :symlink_open "~-"}}) - -(setup {:filters {:dotfiles false} - :disable_netrw true - :hijack_netrw true - :auto_close false - :open_on_tab false - :hijack_cursor true - :update_cwd true - :update_focused_file {:enable true :update_cwd false} - :view {:allow_resize true :side :left :width 25 :hide_root_folder true} - :git {:enable false :ignore false}}) diff --git a/fnl/nvrc/packs/treesitter.fnl b/fnl/nvrc/packs/treesitter.fnl index d43f97a..befcbc9 100644 --- a/fnl/nvrc/packs/treesitter.fnl +++ b/fnl/nvrc/packs/treesitter.fnl @@ -4,17 +4,27 @@ (setup {:ensure_installed [:fennel :lua :nix] :highlight {:enable true} + :context_commentstring {:enable true + :config {:fennel "; %s"}} + :rainbow {:enable true + :extended_mode true + :max_file_lines 2000 + :disable ["c" "cpp"] + :colors [ + (. colors :skyblue) + (. colors :blue) + (. colors :violet) + (. colors :magenta)]} :indent {:enable true} :refactor {:highlight_definitions {:enable true} :highlight_current_scope {:enable false} :smart_rename {:enable true - :keymaps {:smart_rename :rn}} + :keymaps {:smart_rename :grr}} :navigation {:enable true - :keymaps {:goto_definition :gd - :list_definitions :ld - :list_definitions_toc :td - :goto_next_usage : - :goto_previous_usage ""}}} + :keymaps {:goto_definition :gnd + :list_definitions :gnD + :goto_next_usage : + :goto_previous_usage :}}} :textobjects {:select {:enable true :lookahead true :keymaps {:if "@function.inner" -- cgit 1.4.1