Add config for nvim-tree plugin

This commit is contained in:
Tyler Kelley 2024-05-15 13:01:25 -05:00
parent 005d4f617a
commit e40e653411
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,47 @@
local nvimtree = require("nvim-tree")
-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
nvimtree.setup({
view = {
width = 35,
relativenumber = true,
},
-- change folder arrow icons
renderer = {
indent_markers = {
enable = true,
},
icons = {
glyphs = {
folder = {
arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open
},
},
},
},
-- disable window_picker for
-- explorer to work well with
-- window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
filters = {
custom = { ".DS_Store" },
},
git = {
ignore = false,
},
})
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "<leader>fe", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer

View File

@ -199,6 +199,7 @@ in
cmp_luasnip
cmp-nvim-lsp
telescope-nvim
nvim-tree-lua
telescope-fzf-native-nvim
vim-tmux-navigator
];
@ -208,6 +209,7 @@ in
${builtins.readFile ../../config/nvim/plugins/cmp.lua}
${builtins.readFile ../../config/nvim/plugins/lsp.lua}
${builtins.readFile ../../config/nvim/plugins/telescope.lua}
${builtins.readFile ../../config/nvim/plugins/nvim-tree.lua}
${builtins.readFile ../../config/nvim/plugins/treesitter.lua}
require("Comment").setup()
require("lualine").setup({