Add edgy with recommended config, adjust some plugins to work with it

Neotree is back on the side for edgy support
ToggleTerm back to horizontal rather than tab
This commit is contained in:
Evie Litherland-Smith 2023-06-06 15:34:30 +01:00
parent 497fed2c07
commit 8be5da1fbc
5 changed files with 67 additions and 18 deletions

View file

@ -14,19 +14,11 @@ return {
]] ]]
dashboard.section.header.val = vim.split(logo, "\n") dashboard.section.header.val = vim.split(logo, "\n")
-- dashboard.section.header.val = {
-- [[ __ ]],
-- [[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
-- [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
-- [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
-- [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
-- [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
-- }
dashboard.section.buttons.val = { dashboard.section.buttons.val = {
dashboard.button("t", "" .. " Terminal", "<cmd>ToggleTerm direction=tab <CR>"), dashboard.button("t", "" .. " Terminal", "<cmd>ToggleTerm <CR>"),
dashboard.button("f", "" .. " Find file", "<cmd>Telescope find_files <CR>"), dashboard.button("f", "" .. " Find file", "<cmd>Telescope find_files <CR>"),
dashboard.button("r", "" .. " Recent files", "<cmd>Telescope oldfiles <CR>"), dashboard.button("r", "" .. " Recent files", "<cmd>Telescope oldfiles <CR>"),
dashboard.button("n", "" .. " Neo-tree", "<cmd>Neotree float <CR>"), dashboard.button("n", "" .. " Neo-tree", "<cmd>Neotree <CR>"),
dashboard.button("g", "󰊢 " .. " Git status", "<cmd>Neogit <CR>"), dashboard.button("g", "󰊢 " .. " Git status", "<cmd>Neogit <CR>"),
dashboard.button("c", "" .. " Config", "<cmd>e $MYVIMRC <CR>"), dashboard.button("c", "" .. " Config", "<cmd>e $MYVIMRC <CR>"),
dashboard.button("l", "󰒲 " .. " Lazy", "<cmd>Lazy<CR>"), dashboard.button("l", "󰒲 " .. " Lazy", "<cmd>Lazy<CR>"),

55
lua/plugins/edgy.lua Normal file
View file

@ -0,0 +1,55 @@
return {
"folke/edgy.nvim",
event = "VeryLazy",
opts = {
bottom = {
-- toggleterm / lazyterm at the bottom with a height of 40% of the screen
{ ft = "toggleterm", size = { height = 0.4 } },
{
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 = "SymbolsOutline",
},
-- any other neo-tree windows
"neo-tree",
},
},
}

View file

@ -10,7 +10,7 @@ return {
cmd = "Neotree", cmd = "Neotree",
init = function() init = function()
vim.g.neo_tree_remove_legacy_commands = 1 vim.g.neo_tree_remove_legacy_commands = 1
vim.keymap.set("n", "<leader>nn", "<cmd>Neotree float reveal reveal_force_cwd<cr>") vim.keymap.set("n", "<leader>nn", "<cmd>Neotree reveal reveal_force_cwd<cr>")
end, end,
config = true, config = true,
opts = { opts = {

View file

@ -0,0 +1,7 @@
return {
"simrat39/symbols-outline.nvim",
cond = not vim.g.vscode,
cmd = "SymbolsOutline",
dependencies = { "neovim/nvim-lspconfig" },
config = true,
}

View file

@ -3,11 +3,6 @@ return {
cond = not vim.g.vscode, cond = not vim.g.vscode,
version = "*", version = "*",
cmd = { "ToggleTerm" }, cmd = { "ToggleTerm" },
init = function() init = function() vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm<CR>") end,
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=tab<CR>") opts = { direction = "horizontal" },
vim.keymap.set("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<CR>")
vim.keymap.set("n", "<leader>tv", "<cmd>ToggleTerm direction=vertical<CR>")
vim.keymap.set("n", "<leader>tf", "<cmd>ToggleTerm direction=float<CR>")
end,
config = true,
} }