| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- --@diagnostic disable: undefined-doc-name
- return {
- {
- "lucobellic/edgy-group.nvim",
- event = "VeryLazy",
- dependencies = { "folke/edgy.nvim" },
- keys = {
- {
- "<leader>el",
- function()
- require("edgy-group").open_group_offset("right", 1)
- end,
- desc = "Edgy Group Next Left",
- },
- {
- "<leader>eh",
- function()
- require("edgy-group").open_group_offset("left", -1)
- end,
- desc = "Edgy Group Prev Left",
- },
- {
- "<c-,>",
- function()
- require("edgy-group.stl").pick()
- end,
- desc = "Edgy Group Pick",
- },
- },
- opts = {
- groups = {
- left = {
- { icon = "", titles = { "Files", "Git" } },
- -- { icon = "", titles = { "Git" } },
- -- { icon = "", titles = { "Outline" } },
- },
- },
- statusline = {
- -- suffix and prefix separators between icons
- separators = { " ", " " },
- clickable = false, -- open group on click
- colored = true, -- enable highlight support
- colors = { -- highlight colors
- active = "Normal", -- highlight color for open group
- inactive = "Normal", -- highlight color for closed group
- pick_active = "PmenuSel", -- highlight color for pick key for open group
- pick_inactive = "PmenuSel", -- highlight color for pick key for closed group
- },
- -- pick key position: left, right, left_separator, right_separator, icon
- -- left: before left separator
- -- right: after right separator
- -- left_separator, right_separator and icon: replace the corresponding element
- pick_key_pose = "left",
- pick_function = nil, -- optional function to override default behavior
- },
- toggle = 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 = {
- {
- title = "Files",
- ft = "neo-tree",
- filter = function(buf)
- return vim.b[buf].neo_tree_source == "filesystem"
- end,
- size = { height = 0.8 },
- open = "Neotree position=left filesystem",
- },
- {
- title = "Buffers",
- ft = "neo-tree",
- filter = function(buf)
- return vim.b[buf].neo_tree_source == "buffers"
- end,
- open = "Neotree position=top buffers",
- },
- {
- title = "Git",
- ft = "neo-tree",
- filter = function(buf)
- return vim.b[buf].neo_tree_source == "git_status"
- end,
- open = "Neotree position=right git_status",
- },
- },
- right = {
- -- {
- -- ft = "Outline",
- -- open = ,
- -- },
- },
- -- 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,
- -- pinned = true,
- -- collapsed = false, -- show window as closed/collapsed on start
- -- open = "Neotree position=left filesystem",
- -- size = { height = 0.7 },
- -- },
- -- {
- -- title = "Neo-Tree Git",
- -- ft = "neo-tree",
- -- filter = function(buf)
- -- return vim.b[buf].neo_tree_source == "git_status"
- -- end,
- -- pinned = true,
- -- collapsed = false, -- show window as closed/collapsed on start
- -- open = "Neotree position=left git_status",
- -- size = { height = 0.3 },
- -- },
- -- {
- -- title = "Neo-Tree Buffers",
- -- ft = "neo-tree",
- -- filter = function(buf)
- -- return vim.b[buf].neo_tree_source == "buffers"
- -- end,
- -- pinned = true,
- -- collapsed = true, -- show window as closed/collapsed on start
- -- open = "Neotree position=top buffers",
- -- },
- -- {
- -- title = function()
- -- local buf_name = vim.api.nvim_buf_get_name(0) or "[No Name]"
- -- return vim.fn.fnamemodify(buf_name, ":t")
- -- end,
- -- ft = "Outline",
- -- pinned = true,
- -- open = "SymbolsOutlineOpen",
- --
- -- },
- -- any other neo-tree windows
- -- },
- options = {
- left = { size = 25 },
- bottom = { size = 10 },
- right = { size = 30 },
- top = { size = 10 },
- },
- -- edgebar animations
- animate = {
- enabled = true,
- fps = 100, -- frames per second
- cps = 120, -- cells per second
- on_begin = function()
- vim.g.minianimate_disable = true
- end,
- on_end = function()
- vim.g.minianimate_disable = false
- end,
- -- Spinner for pinned views that are loading.
- -- if you have noice.nvim installed, you can use any spinner from it, like:
- -- spinner = require("noice.util.spinners").spinners.circleFull,
- spinner = {
- frames = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" },
- interval = 80,
- },
- },
- -- enable this to exit Neovim when only edgy windows are left
- exit_when_last = false,
- -- close edgy when all windows are hidden instead of opening one of them
- -- disable to always keep at least one edgy split visible in each open section
- close_when_all_hidden = true,
- -- global window options for edgebar windows
- ---@type vim.wo
- wo = {
- -- Setting to `true`, will add an edgy winbar.
- -- Setting to `false`, won't set any winbar.
- -- Setting to a string, will set the winbar to that string.
- winbar = false,
- winfixwidth = true,
- winfixheight = false,
- winhighlight = "WinBar:EdgyWinBar,Normal:EdgyNormal",
- spell = false,
- signcolumn = "no",
- },
- -- buffer-local keymaps to be added to edgebar buffers.
- -- Existing buffer-local keymaps will never be overridden.
- -- Set to false to disable a builtin.
- ---@type table<string, fun(win:Edgy.Window)|false>
- keys = {
- -- close window
- ["q"] = function(win)
- win:close()
- end,
- -- hide window
- ["<c-q>"] = function(win)
- win:hide()
- end,
- -- close sidebar
- ["Q"] = function(win)
- win.view.edgebar:close()
- end,
- -- next open window
- ["]w"] = function(win)
- win:next({ visible = true, focus = true })
- end,
- -- previous open window
- ["[w"] = function(win)
- win:prev({ visible = true, focus = true })
- end,
- -- next loaded window
- ["]W"] = function(win)
- win:next({ pinned = false, focus = true })
- end,
- -- prev loaded window
- ["[W"] = function(win)
- win:prev({ pinned = false, focus = true })
- end,
- -- increase width
- ["<c-w>>"] = function(win)
- win:resize("width", 2)
- end,
- -- decrease width
- ["<c-w><lt>"] = function(win)
- win:resize("width", -2)
- end,
- -- increase height
- ["<c-w>+"] = function(win)
- win:resize("height", 2)
- end,
- -- decrease height
- ["<c-w>-"] = function(win)
- win:resize("height", -2)
- end,
- -- reset all custom sizing
- ["<c-w>="] = function(win)
- win.view.edgebar:equalize()
- end,
- },
- icons = {
- closed = " ",
- open = " ",
- },
- -- enable this on Neovim <= 0.10.0 to properly fold edgebar windows.
- -- Not needed on a nightly build >= June 5, 2023.
- fix_win_height = vim.fn.has("nvim-0.10.0") == 0,
- },
- },
- }
|