From ed137a15ff54dd4fc9a30183d9d626ae6f0cff50 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Thu, 29 May 2025 14:53:31 +0300 Subject: 29.05.2025 --- nvim/lua/plugins/tree.lua | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'nvim/lua/plugins/tree.lua') diff --git a/nvim/lua/plugins/tree.lua b/nvim/lua/plugins/tree.lua index 94d1f11..3bf9eed 100644 --- a/nvim/lua/plugins/tree.lua +++ b/nvim/lua/plugins/tree.lua @@ -1,5 +1,4 @@ -local HEIGHT_RATIO = 0.8 -local WIDTH_RATIO = 0.5 +local WIDTH_RATIO = 0.25 return { "nvim-tree/nvim-tree.lua", @@ -9,36 +8,10 @@ return { opts = { disable_netrw = true, hijack_netrw = true, - hijack_directories = { - enable = true, - auto_open = true, - }, sort = { sorter = "case_sensitive", }, view = { - -- width = 30, - float = { - enable = true, - open_win_config = function() - local screen_w = vim.opt.columns:get() - local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get() - local window_w = screen_w * WIDTH_RATIO - local window_h = screen_h * HEIGHT_RATIO - local window_w_int = math.floor(window_w) - local window_h_int = math.floor(window_h) - local center_x = (screen_w - window_w) / 2 - local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get() - return { - border = "rounded", - relative = "editor", - row = center_y, - col = center_x, - width = window_w_int, - height = window_h_int, - } - end, - }, width = function() return math.floor(vim.opt.columns:get() * WIDTH_RATIO) end, @@ -60,11 +33,8 @@ return { filters = { dotfiles = false, }, - sync_root_with_cwd = true, - respect_buf_cwd = true, update_focused_file = { enable = true, - update_root = true, }, }, keys = { -- cgit v1.2.3