Move NvimTree file explorer to left side
- Change side from 'right' to 'left' in nvim-tree.lua - Update edgy.nvim config to place NvimTree in left panel
This commit is contained in:
82
lua/cargdev/plugins/diffview.lua
Normal file
82
lua/cargdev/plugins/diffview.lua
Normal file
@@ -0,0 +1,82 @@
|
||||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles", "DiffviewFileHistory" },
|
||||
keys = {
|
||||
{ "<leader>gd", "<cmd>DiffviewOpen<cr>", desc = "Diffview open" },
|
||||
{ "<leader>gD", "<cmd>DiffviewClose<cr>", desc = "Diffview close" },
|
||||
{ "<leader>gh", "<cmd>DiffviewFileHistory %<cr>", desc = "File history (current)" },
|
||||
{ "<leader>gH", "<cmd>DiffviewFileHistory<cr>", desc = "File history (repo)" },
|
||||
},
|
||||
opts = {
|
||||
diff_binaries = false,
|
||||
enhanced_diff_hl = true,
|
||||
use_icons = true,
|
||||
show_help_hints = true,
|
||||
watch_index = true,
|
||||
icons = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
},
|
||||
signs = {
|
||||
fold_closed = "",
|
||||
fold_open = "",
|
||||
done = "✓",
|
||||
},
|
||||
view = {
|
||||
default = {
|
||||
layout = "diff2_horizontal",
|
||||
winbar_info = false,
|
||||
},
|
||||
merge_tool = {
|
||||
layout = "diff3_horizontal",
|
||||
disable_diagnostics = true,
|
||||
winbar_info = true,
|
||||
},
|
||||
file_history = {
|
||||
layout = "diff2_horizontal",
|
||||
winbar_info = false,
|
||||
},
|
||||
},
|
||||
file_panel = {
|
||||
listing_style = "tree",
|
||||
tree_options = {
|
||||
flatten_dirs = true,
|
||||
folder_statuses = "only_folded",
|
||||
},
|
||||
win_config = {
|
||||
position = "left",
|
||||
width = 35,
|
||||
},
|
||||
},
|
||||
file_history_panel = {
|
||||
log_options = {
|
||||
git = {
|
||||
single_file = {
|
||||
diff_merges = "combined",
|
||||
},
|
||||
multi_file = {
|
||||
diff_merges = "first-parent",
|
||||
},
|
||||
},
|
||||
},
|
||||
win_config = {
|
||||
position = "bottom",
|
||||
height = 16,
|
||||
},
|
||||
},
|
||||
hooks = {},
|
||||
keymaps = {
|
||||
view = {
|
||||
{ "n", "<tab>", "<cmd>DiffviewToggleFiles<cr>", { desc = "Toggle file panel" } },
|
||||
{ "n", "q", "<cmd>DiffviewClose<cr>", { desc = "Close diffview" } },
|
||||
},
|
||||
file_panel = {
|
||||
{ "n", "q", "<cmd>DiffviewClose<cr>", { desc = "Close diffview" } },
|
||||
},
|
||||
file_history_panel = {
|
||||
{ "n", "q", "<cmd>DiffviewClose<cr>", { desc = "Close diffview" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user