feat: implement snacks statuscolumn configuration

This commit is contained in:
2024-11-24 20:19:32 -05:00
parent 55931aa562
commit a9203b51a9
2 changed files with 52 additions and 3 deletions
+5 -3
View File
@@ -61,6 +61,8 @@ vim.g.ignore_no_lazy = false ---@type boolean Options: <true
vim.g.codesnap = true ---@type boolean Options: <true|false>
-- Enable Auto-hiding cursorline
vim.g.auto_cursorline = false ---@type boolean Options: <true|false>
-- Toggle cursorline (when not auto)
vim.o.cursorline = false ---@type boolean Options: <true|false>
-- Enable Smart Scrolloff
vim.g.smart_scrolloff = false ---@type boolean Options: <true|false>
-- Enable Dead Column
@@ -117,10 +119,10 @@ vim.g.cmp_performance_enabled = false ---@type boolean Options: <true|
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ STATUS COLUMN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
vim.g.statuscolumn = "native" ---@type string Options: [statuscolumn]
vim.g.statuscolumn = "snacks" ---@type string Options: [statuscolumn]
-- ╭───────────────────────────╮  barsNlines
-- │ │  native
-- │ Status Columns: │
-- │ │  snacks
-- │ Status Columns: │  native
-- │ Choose a plugin from │
-- │ the list  │
-- │ │
+47
View File
@@ -0,0 +1,47 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ Snacks │
-- ╰─────────────────────────────────────────────────────────╯
local P = {}
-- Snacks statuscolumn
local statuscolumn = {
'folke/snacks.nvim',
opts = {
statuscolumn = {
enabled = true,
left = { 'mark', 'sign' }, -- priority of signs on the left (high to low)
right = { 'fold', 'git' }, -- priority of signs on the right (high to low)
folds = {
open = false, -- show open fold icons
git_hl = true, -- use Git Signs hl for fold icons
},
git = {
-- patterns to match Git signs
patterns = { 'GitSign', 'MiniDiffSign' },
},
refresh = 50, -- refresh at most every 50ms
},
},
}
local nostatuscolumn = {
'folke/snacks.nvim',
opts = {
statuscolumn = {
enabled = false,
},
},
}
if
require('data.func').check_global_var('statuscolumn', 'snacks', 'native')
then
-- Add Snacks statuscolumn
table.insert(P, statuscolumn)
else
table.insert(P, nostatuscolumn)
end
return P