about summary refs log tree commit diff
path: root/fnl/nvrc/packs
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc/packs')
-rw-r--r--fnl/nvrc/packs/diffview.fnl7
-rw-r--r--fnl/nvrc/packs/filetype.fnl3
-rw-r--r--fnl/nvrc/packs/harpoon.fnl3
-rw-r--r--fnl/nvrc/packs/mergetool.fnl7
-rw-r--r--fnl/nvrc/packs/nvimtree.fnl44
-rw-r--r--fnl/nvrc/packs/treesitter.fnl22
6 files changed, 36 insertions, 50 deletions
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 "<cmd>DiffviewClose<cr>"}
+                       :file_history_panel {:q "<cmd>DiffviewClose<cr>"}
+                       :view {:q "<cmd>DiffviewClose<cr>"}}})
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 :<localleader>rn}}
+                                  :keymaps {:smart_rename :grr}}
                    :navigation {:enable true
-                                :keymaps {:goto_definition :<localleader>gd
-                                          :list_definitions :<localleader>ld
-                                          :list_definitions_toc :<localleader>td
-                                          :goto_next_usage :<a-*>
-                                          :goto_previous_usage "<a-#>"}}}
+                                :keymaps {:goto_definition :gnd
+                                          :list_definitions :gnD
+                                          :goto_next_usage :<M-2>
+                                          :goto_previous_usage :<M-1>}}}
         :textobjects {:select {:enable true
                                :lookahead true
                                :keymaps {:if "@function.inner"