vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.opt.termguicolors = true vim.cmd("colorscheme codedark") vim.keymap.set('n', 'e', 'NvimTreeToggle') local function my_on_attach(bufnr) local api = require('nvim-tree.api') local function opts(desc) return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } end api.config.mappings.default_on_attach(bufnr) vim.keymap.set('n', 'l', api.node.open.edit, opts('Open')) vim.keymap.set('n', 'h', api.node.navigate.parent_close, opts('Close Directory')) end require("nvim-tree").setup({ on_attach = my_on_attach, disable_netrw = true, hijack_netrw = true, sync_root_with_cwd = true, respect_buf_cwd = true, update_focused_file = { enable = true, update_root = true }, })