Files
nvim/lua/rakshit/plugins/filemanager.lua

50 lines
1007 B
Lua

require("nvim-tree").setup({
view = {
float = {
enable = true,
open_win_config = function()
local screen_w = vim.opt.columns:get()
local screen_h = vim.opt.lines:get()
local window_w = math.floor(screen_w * 0.6)
local window_h = math.floor(screen_h * 0.7)
local center_x = math.floor((screen_w - window_w) / 2)
local center_y = math.floor((screen_h - window_h) / 2)
return {
border = "rounded",
relative = "editor",
row = center_y,
col = center_x,
width = window_w,
height = window_h,
}
end,
},
width = 30,
},
actions = {
open_file = {
quit_on_open = true, -- closes tree when opening a file
},
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
folder = true,
file = true,
folder_arrow = true,
},
},
},
filters = {
dotfiles = true,
},
})