summaryrefslogtreecommitdiff
path: root/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua
diff options
context:
space:
mode:
Diffstat (limited to 'public/nvim/.nvim/lua/plugins/core/nvim-tree.lua')
-rw-r--r--public/nvim/.nvim/lua/plugins/core/nvim-tree.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua b/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua
new file mode 100644
index 0000000..e8ca82f
--- /dev/null
+++ b/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua
@@ -0,0 +1,36 @@
+return {
+ {
+ "nvim-tree/nvim-tree.lua",
+ config = function()
+ require("nvim-tree").setup({
+ sync_root_with_cwd = false,
+ update_focused_file = {
+ enable = true,
+ update_root = false,
+ },
+ renderer = {
+ indent_markers = { enable = true },
+ highlight_git = true,
+ highlight_opened_files = "all",
+ },
+ })
+ end,
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ },
+
+ -- Add nvim-tree which-key shortcuts
+ {
+ "folke/which-key.nvim",
+ opts = function(_, opts)
+ if type(opts) ~= "table" then
+ opts = {}
+ end
+
+ if type(opts.f) ~= "table" then
+ opts["f"] = {}
+ end
+
+ opts.f["e"] = { "<cmd>NvimTreeToggle<cr>", "Explorer" }
+ end,
+ },
+}