Skip to content

Commit

Permalink
Add edgy.nvim plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Oct 12, 2023
1 parent 020f771 commit cc3ed94
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
98 changes: 98 additions & 0 deletions lua/configs/plugin/edgy.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
local status, edgy = pcall(require, "edgy")
if not status then
vim.notify("edgy.nvim not found", "error")
return
end

local opts = {
bottom = {
{
ft = "toggleterm",
size = { height = 0.4 },
filter = function(buf, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{
ft = "noice",
size = { height = 0.4 },
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 },
-- don't open help files in edgy that we're editing
filter = function(buf)
return vim.bo[buf].buftype == "help"
end,
},
{ ft = "spectre_panel", size = { height = 0.4 } },
{ title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } },
},
left = {
{
title = "Neo-Tree",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "filesystem"
end,
pinned = true,
open = function()
vim.api.nvim_input("<esc><space>e")
end,
size = { height = 0.5 },
},
{ title = "Neotest Summary", ft = "neotest-summary" },
{
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",
},
"neo-tree",
},
keys = {
-- increase width
["<c-Right>"] = function(win)
win:resize("width", 2)
end,
-- decrease width
["<c-Left>"] = function(win)
win:resize("width", -2)
end,
-- increase height
["<c-Up>"] = function(win)
win:resize("height", 2)
end,
-- decrease height
["<c-Down>"] = function(win)
win:resize("height", -2)
end,
},
}

edgy.setup(opts)
25 changes: 25 additions & 0 deletions lua/plugins/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,31 @@ return {
require("configs.plugin.flash")
end,
},
-- edgy.nvim
-- Easily create and manage predefined window layouts, bringing a new edge to your workflow
{
"folke/edgy.nvim",
event = "VeryLazy",
keys = {
{
"<leader>ue",
function()
require("edgy").toggle()
end,
desc = "Edgy Toggle",
},
{
"<leader>uE",
function()
require("edgy").select()
end,
desc = "Edgy Select Window",
},
},
config = function()
require("configs.plugin.edgy")
end,
},
-- glow.nvim
-- A markdown preview directly in your neovim.
{ "ellisonleao/glow.nvim", config = true, cmd = "Glow" },
Expand Down

0 comments on commit cc3ed94

Please sign in to comment.