From b462ae20bf66c8654c3e2a1d735cf5620375033f Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 27 Jul 2023 10:35:34 +0300 Subject: [PATCH] feat(nvim): plugin: folke/edgy --- config/astronvim/lua/user/plugins/user.lua | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/config/astronvim/lua/user/plugins/user.lua b/config/astronvim/lua/user/plugins/user.lua index 15a6393..d191f70 100644 --- a/config/astronvim/lua/user/plugins/user.lua +++ b/config/astronvim/lua/user/plugins/user.lua @@ -12,4 +12,80 @@ return { lazy = false, enabled = true, }, + { + "folke/edgy.nvim", + event = "VeryLazy", + init = function() + vim.opt.laststatus = 3 + vim.opt.splitkeep = "screen" + end, + opts = { + bottom = { + -- toggleterm / lazyterm at the bottom with a height of 40% of the screen + { + ft = "toggleterm", + size = { height = 0.4 }, + -- exclude floating windows + filter = function(buf, win) + return vim.api.nvim_win_get_config(win).relative == "" + end, + }, + { + ft = "lazyterm", + title = "LazyTerm", + size = { height = 0.4 }, + filter = function(buf) + return not vim.b[buf].lazyterm_cmd + end, + }, + "Trouble", + { ft = "qf", title = "QuickFix" }, + { + ft = "help", + size = { height = 20 }, + -- only show help buffers + filter = function(buf) + return vim.bo[buf].buftype == "help" + end, + }, + { ft = "spectre_panel", size = { height = 0.4 } }, + }, + left = { + -- Neo-tree filesystem always takes half the screen height + { + title = "Neo-Tree", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "filesystem" + end, + size = { height = 0.5 }, + }, + { + title = "Neo-Tree Git", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "git_status" + end, + pinned = true, + open = "Neotree position=right git_status", + }, + { + title = "Neo-Tree Buffers", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "buffers" + end, + pinned = true, + open = "Neotree position=top buffers", + }, + { + ft = "Outline", + pinned = true, + open = "SymbolsOutlineOpen", + }, + -- any other neo-tree windows + "neo-tree", + }, + }, + }, }