config: bye float neovim

main
sudo pacman -Syu 2023-05-14 23:43:03 +07:00
parent c6103c6a76
commit a992579f8e
1 changed files with 0 additions and 27 deletions

View File

@ -129,33 +129,6 @@ require("packer").startup(function()
"nvim-tree/nvim-tree.lua",
config = function()
require("nvim-tree").setup({
view = {
float = {
enable = true,
-- https://www.reddit.com/r/neovim/comments/wvcz64/nvimtreelua_how_to_center_floating_window
-- https://github.com/MarioCarrion/videos/blob/main/2023/01/nvim/lua/plugins/nvim-tree.lua
open_win_config = function()
local HEIGHT_RATIO = 0.8
local WIDTH_RATIO = 0.5
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,
},
},
renderer = {
group_empty = true,
icons = {