feat: implement snacks statuscolumn configuration
This commit is contained in:
@@ -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 │
|
||||
-- │ │
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user