summaryrefslogtreecommitdiff
path: root/lua/plugins/nvim-tree.lua
diff options
context:
space:
mode:
authorlistout <listout@protonmail.com>2022-11-07 12:31:33 +0530
committerlistout <listout@protonmail.com>2022-11-07 12:31:33 +0530
commitba786f399d09a5f3396271b30e5289a5c9461ec8 (patch)
treeadbff2958fb4d7e9af771f4f4386022f37bf579b /lua/plugins/nvim-tree.lua
parent6f1c23d8edfbb6520425efbfaa90ef5ed4a43f87 (diff)
nvim: nvim-tree.lua: nvim-tree config and toggle
Toggle nvim-tree with <leader>e Signed-off-by: listout <listout@protonmail.com>
Diffstat (limited to 'lua/plugins/nvim-tree.lua')
-rw-r--r--lua/plugins/nvim-tree.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua
new file mode 100644
index 0000000..23658b1
--- /dev/null
+++ b/lua/plugins/nvim-tree.lua
@@ -0,0 +1,27 @@
+-- disable netrw at the very start of your init.lua (strongly advised)
+vim.g.loaded_netrw = 1
+vim.g.loaded_netrwPlugin = 1
+
+-- empty setup using defaults
+require("nvim-tree").setup()
+
+-- OR setup with some options
+require("nvim-tree").setup({
+ sort_by = "case_sensitive",
+ view = {
+ adaptive_size = true,
+ mappings = {
+ list = {
+ { key = "u", action = "dir_up" },
+ },
+ },
+ },
+ renderer = {
+ group_empty = true,
+ },
+ filters = {
+ dotfiles = true,
+ },
+})
+
+vim.api.nvim_set_keymap('n', '<leader>e', ':NvimTreeToggle<CR>', {noremap = true, silent = true})