@@ -79,27 +79,27 @@ require("nvim-tree").setup({
79
79
Optionally customise your mappings, see [ : help nvim-tree-mappings] ( doc/nvim-tree-lua.txt )
80
80
81
81
``` lua
82
- local function my_on_attach (bufnr )
83
- local api = require " nvim-tree.api"
82
+ local function my_on_attach (bufnr )
83
+ local api = require " nvim-tree.api"
84
84
85
- local function opts (desc )
86
- return { desc = " nvim-tree: " .. desc , buffer = bufnr , noremap = true , silent = true , nowait = true }
87
- end
85
+ local function opts (desc )
86
+ return { desc = " nvim-tree: " .. desc , buffer = bufnr , noremap = true , silent = true , nowait = true }
87
+ end
88
88
89
- -- default mappings
90
- api .config .mappings .default_on_attach (bufnr )
89
+ -- default mappings
90
+ api .config .mappings .default_on_attach (bufnr )
91
91
92
- -- custom mappings
93
- vim .keymap .set (' n' , ' <C-t>' , api .tree .change_root_to_parent , opts (' Up' ))
94
- vim .keymap .set (' n' , ' ?' , api .tree .toggle_help , opts (' Help' ))
95
- end
92
+ -- custom mappings
93
+ vim .keymap .set (' n' , ' <C-t>' , api .tree .change_root_to_parent , opts (' Up' ))
94
+ vim .keymap .set (' n' , ' ?' , api .tree .toggle_help , opts (' Help' ))
95
+ end
96
96
97
- -- pass to setup along with your other options
98
- require (" nvim-tree" ).setup {
99
- ---
100
- on_attach = my_on_attach ,
101
- ---
102
- }
97
+ -- pass to setup along with your other options
98
+ require (" nvim-tree" ).setup {
99
+ ---
100
+ on_attach = my_on_attach ,
101
+ ---
102
+ }
103
103
```
104
104
105
105
Open the tree: ` :NvimTreeOpen `
0 commit comments