summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-04-25 00:09:04 +0300
committerKyren223 <Kyren223@proton.me>2025-04-25 00:09:04 +0300
commita7eb6600c4b633df791bb1df3e1a35f26fd22a84 (patch)
tree3f34923e1b97d04461f2a753cec3b6c81960e58a /.config/nvim/lua
parent018350e5527272c8e569e3af2236beff4dedc81c (diff)
Added snacks terminal although I don't like it, I tried in the past some
terminal plugins and I found them very lacking, I'll do more research tmr
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/plugins/edgy.lua38
-rw-r--r--.config/nvim/lua/plugins/snacks.lua24
2 files changed, 38 insertions, 24 deletions
diff --git a/.config/nvim/lua/plugins/edgy.lua b/.config/nvim/lua/plugins/edgy.lua
index 872247f..f84d0ba 100644
--- a/.config/nvim/lua/plugins/edgy.lua
+++ b/.config/nvim/lua/plugins/edgy.lua
@@ -1,28 +1,20 @@
return {
'folke/edgy.nvim',
event = 'VeryLazy',
- opts = {
- bottom = {
- 'Trouble',
- { ft = 'qf', title = 'QuickFix' },
- {
- ft = 'help',
- size = { height = 20 },
- filter = function(buf) -- only show help buffers
- return vim.bo[buf].buftype == 'help'
+ opts = function(_, opts)
+ for _, pos in ipairs({ 'top', 'bottom', 'left', 'right' }) do
+ opts[pos] = opts[pos] or {}
+ table.insert(opts[pos], {
+ ft = 'snacks_terminal',
+ size = { height = 0.4 },
+ title = '%{b:snacks_terminal.id}: %{b:term_title}',
+ filter = function(_buf, win)
+ return vim.w[win].snacks_win
+ and vim.w[win].snacks_win.position == pos
+ and vim.w[win].snacks_win.relative == 'editor'
+ and not vim.w[win].trouble_preview
end,
- },
- { ft = 'spectre_panel', size = { height = 0.4 } },
- },
- left = {
- {
- title = 'Neo-Tree',
- ft = 'neo-tree',
- filter = function(buf)
- return vim.b[buf].neo_tree_source == 'filesystem'
- end,
- size = { height = 0.5 },
- },
- },
- },
+ })
+ end
+ end,
}
diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua
index b86fafe..c64648f 100644
--- a/.config/nvim/lua/plugins/snacks.lua
+++ b/.config/nvim/lua/plugins/snacks.lua
@@ -54,6 +54,13 @@ return {
},
},
},
+ -- scroll = {
+ -- animate = {
+ -- duration = { step = 15, total = 50 },
+ -- easing = 'linear',
+ -- },
+ -- },
+ terminal = {},
},
keys = {
{
@@ -229,7 +236,22 @@ return {
function()
Snacks.scratch.select()
end,
- desc = 'Select Scratch Buffer',
+ desc = 'Select [S]cratch Buffer',
+ },
+
+ {
+ '<leader>nt',
+ function()
+ Snacks.terminal.open()
+ end,
+ desc = '[N]ew [T]erminal',
+ },
+ {
+ '<leader>T',
+ function()
+ Snacks.terminal.toggle()
+ end,
+ desc = 'Toggle [T]erminal',
},
},
}