adding sidebar

This commit is contained in:
Wilson Soetomo 2025-07-29 16:23:06 -04:00
parent d5b58a58b0
commit 5188bb0e10
2 changed files with 38 additions and 0 deletions

View File

@ -35,3 +35,6 @@ end)
vim.keymap.set('n', '<leader>4', function() vim.keymap.set('n', '<leader>4', function()
harpoon:list():select(4) harpoon:list():select(4)
end) end)
-- In your keybindings configuration (e.g., lua/config/keymaps.lua or init.lua)
vim.keymap.set('n', '<leader>w', '<cmd>NvimTreeToggle<CR>', { desc = 'Toggle NvimTree' })

View File

@ -1,5 +1,8 @@
return { return {
-- Other plugins in here -- Other plugins in here
{
'nvim-tree/nvim-web-devicons',
},
{ {
'stevearc/oil.nvim', 'stevearc/oil.nvim',
opts = {}, opts = {},
@ -50,4 +53,36 @@ return {
} }
end, end,
}, },
{
'nvim-tree/nvim-tree.lua',
version = '*', -- recommended
lazy = false,
dependencies = {
'nvim-tree/nvim-web-devicons', -- optional, for file icons
},
opts = {
view = {
side = 'left',
width = 30,
float = { enable = false },
},
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = { enable = true, update_root = true },
renderer = {
group_empty = true,
indent_width = 2,
},
actions = { open_file = { resize_window = true } },
},
init = function()
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
end,
-- Other nvim-tree options can go here
-- For example, to automatically close on file selection:
-- auto_close = true,
-- To show hidden files:
-- hide_dotfiles = false,
},
} }