summaryrefslogtreecommitdiff
path: root/lua/plugins/core/nvim-tree.lua
diff options
context:
space:
mode:
authorChristian Segundo2024-02-18 08:19:51 +0100
committerChristian Segundo2024-02-18 08:19:51 +0100
commit85d7d7c082bd84d3c701ceec3d477ee37db5c827 (patch)
treeb78f09285c5120783f94cf9c2465a46439af2b71 /lua/plugins/core/nvim-tree.lua
parent7869bf2c310fbed680abd01d45a17057f857bf30 (diff)
downloadconfig-85d7d7c082bd84d3c701ceec3d477ee37db5c827.tar.gz
bootstrap
Diffstat (limited to 'lua/plugins/core/nvim-tree.lua')
-rw-r--r--lua/plugins/core/nvim-tree.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/lua/plugins/core/nvim-tree.lua b/lua/plugins/core/nvim-tree.lua
new file mode 100644
index 0000000..e8ca82f
--- /dev/null
+++ b/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,
+ },
+}