feat(plugin): modernize plugin configurations and add colorscheme

- Fix plugin quoting and require calls in 00‑colorscheme.lua
- Set gruvbox colorscheme with transparent mode and updated overrides  - Update snacks.nvim layout to use string quotes and minor option tweaks
- Add markdown‑preview plugin with build step
- Consolidate configuration keys and remove deprecated settings
This commit is contained in:
sankalp committed 2026-05-09 12:46:02 +05:45
1 parent 03c18e8231
commit d6bdd7d0f4
3 files changed
+120 -118

No files matched your search

+13 -11
View File
@@ -1,7 +1,7 @@
add("ellisonleao/gruvbox.nvim") add('ellisonleao/gruvbox.nvim')
local palette = require("gruvbox").palette local palette = require('gruvbox').palette
require("gruvbox").setup({ require('gruvbox').setup({
bold = false, bold = false,
italic = { italic = {
strings = false, strings = false,
@@ -9,21 +9,21 @@ require("gruvbox").setup({
comments = false, comments = false,
folds = false, folds = false,
}, },
contrast = "hard", contrast = 'hard',
transparent_mode = true, transparent_mode = true,
overrides = { overrides = {
-- builtin -- builtin
SignColumn = { bg = "None" }, SignColumn = { bg = 'None' },
CursorLineNr = { bg = "None" }, CursorLineNr = { bg = 'None' },
Whitespace = { fg = palette.dark0 }, Whitespace = { fg = palette.dark0 },
EndOfBuffer = { fg = palette.dark0_hard }, EndOfBuffer = { fg = palette.dark0_hard },
Visual = { fg = "None", bg = palette.dark1 }, Visual = { fg = 'None', bg = palette.dark1 },
Label = { link = "GruvboxPurple" }, Label = { link = 'GruvboxPurple' },
-- blink.cmp -- blink.cmp
BlinkCmpMenu = { link = "Normal" }, BlinkCmpMenu = { link = 'Normal' },
BlinkCmpMenuBorder = { link = "BlinkCmpMenu" }, BlinkCmpMenuBorder = { link = 'BlinkCmpMenu' },
BlinkCmpMenuSelection = { fg = "None", bg = palette.dark1 }, BlinkCmpMenuSelection = { fg = 'None', bg = palette.dark1 },
BlinkCmpLabelMatch = { fg = palette.bright_green }, BlinkCmpLabelMatch = { fg = palette.bright_green },
BlinkCmpScrollBarGutter = { bg = palette.dark2 }, BlinkCmpScrollBarGutter = { bg = palette.dark2 },
BlinkCmpScrollBarThumb = { bg = palette.light1 }, BlinkCmpScrollBarThumb = { bg = palette.light1 },
@@ -32,3 +32,5 @@ require("gruvbox").setup({
MiniIndentscopeSymbol = { fg = palette.dark1 }, MiniIndentscopeSymbol = { fg = palette.dark1 },
}, },
}) })
vim.cmd('colorscheme gruvbox')
+2 -1
View File
@@ -11,7 +11,8 @@ add({
'numToStr/Navigator.nvim', -- navigator 'numToStr/Navigator.nvim', -- navigator
'm4xshen/hardtime.nvim', -- workflow 'm4xshen/hardtime.nvim', -- workflow
'mg979/vim-visual-multi', -- multiple cursors 'mg979/vim-visual-multi', -- multiple cursors
'pmizio/typescript-tools.nvim', 'pmizio/typescript-tools.nvim', -- typescript tools
{ src = 'iamcco/markdown-preview.nvim', build = 'cd app && npm install' },
'nvim-lua/plenary.nvim', -- dependency for typescript-tools 'nvim-lua/plenary.nvim', -- dependency for typescript-tools
-- 'nvim-flutter/flutter-tools.nvim', -- flutter tools -- 'nvim-flutter/flutter-tools.nvim', -- flutter tools
}) })
+105 -106
View File
@@ -1,4 +1,4 @@
add("folke/snacks.nvim") add('folke/snacks.nvim')
local function files_layout(preview_width, height, width) local function files_layout(preview_width, height, width)
preview_width = preview_width or 0.6 preview_width = preview_width or 0.6
@@ -6,18 +6,18 @@ local function files_layout(preview_width, height, width)
width = width or 0.9 width = width or 0.9
return { return {
layout = { layout = {
box = "horizontal", box = 'horizontal',
width = width, width = width,
min_width = 120, min_width = 120,
height = height, height = height,
{ {
box = "vertical", box = 'vertical',
border = "rounded", border = 'rounded',
title = "{title} {live} {flags}", title = '{title} {live} {flags}',
{ win = "input", height = 1, border = "bottom" }, { win = 'input', height = 1, border = 'bottom' },
{ win = "list", border = "none" }, { win = 'list', border = 'none' },
}, },
{ win = "preview", title = "{preview}", border = "rounded", width = preview_width }, { win = 'preview', title = '{preview}', border = 'rounded', width = preview_width },
}, },
} }
end end
@@ -33,27 +33,27 @@ local function palette_layout(height, width)
width = width, width = width,
min_width = 80, min_width = 80,
height = height, height = height,
border = "rounded", border = 'rounded',
box = "vertical", box = 'vertical',
{ {
win = "input", win = 'input',
height = 1, height = 1,
border = "rounded", border = 'rounded',
title = "{title} {live} {flags}", title = '{title} {live} {flags}',
title_pos = "center", title_pos = 'center',
}, },
{ win = "list", border = "hpad" }, { win = 'list', border = 'hpad' },
{ win = "preview", title = "{preview}", border = "rounded" }, { win = 'preview', title = '{preview}', border = 'rounded' },
}, },
} }
end end
local Snacks = require("snacks") local Snacks = require('snacks')
Snacks.setup({ Snacks.setup({
animate = { animate = {
enabled = true, enabled = true,
duration = 20, -- ms per step duration = 20, -- ms per step
easing = "linear", easing = 'linear',
fps = 60, fps = 60,
}, },
bigfile = { bigfile = {
@@ -71,29 +71,28 @@ Snacks.setup({
]], ]],
}, },
sections = { sections = {
{ section = "header" }, { section = 'header' },
{ {
icon = "", icon = '',
title = "Keymaps", title = 'Keymaps',
section = "keys", section = 'keys',
indent = 2, indent = 2,
padding = 1, padding = 1,
}, },
{ {
icon = "", icon = '',
title = "Recent Files", title = 'Recent Files',
section = "recent_files", section = 'recent_files',
indent = 2, indent = 2,
padding = 1, padding = 1,
}, },
{ {
icon = "", icon = '',
title = "Projects", title = 'Projects',
section = "projects", section = 'projects',
indent = 2, indent = 2,
padding = 1, padding = 1,
}, },
}, },
}, },
debug = { enabled = true }, debug = { enabled = true },
@@ -105,14 +104,14 @@ Snacks.setup({
siblings = true, siblings = true,
}, },
}, },
explorer = { enabled = true }, explorer = { enabled = false },
projects = { projects = {
enabled = true, enabled = true,
dirs = { dirs = {
"~/Projects", '~/Projects',
"~/Projects/other", '~/Projects/other',
"~/.config/Modus", '~/.config/Modus',
} },
}, },
git = { enabled = true }, git = { enabled = true },
gitbrowse = { enabled = true }, gitbrowse = { enabled = true },
@@ -120,27 +119,27 @@ Snacks.setup({
indent = { indent = {
enabled = true, enabled = true,
priority = 1, priority = 1,
char = "▍", char = '▍',
only_scope = false, only_scope = false,
only_current = false, only_current = false,
hl = { hl = {
"SnacksIndent1", 'SnacksIndent1',
"SnacksIndent2", 'SnacksIndent2',
"SnacksIndent3", 'SnacksIndent3',
"SnacksIndent4", 'SnacksIndent4',
"SnacksIndent5", 'SnacksIndent5',
"SnacksIndent6", 'SnacksIndent6',
"SnacksIndent7", 'SnacksIndent7',
"SnacksIndent8", 'SnacksIndent8',
}, },
}, },
input = { input = {
enabled = true, enabled = true,
icon = "", icon = '',
icon_hl = "SnacksInputIcon", icon_hl = 'SnacksInputIcon',
icon_pos = "left", icon_pos = 'left',
prompt_pos = "title", prompt_pos = 'title',
win = { style = "input" }, win = { style = 'input' },
expand = true, expand = true,
}, },
layout = { enabled = true }, layout = { enabled = true },
@@ -152,29 +151,29 @@ Snacks.setup({
height = { min = 1, max = 0.6 }, height = { min = 1, max = 0.6 },
margin = { top = 0, right = 1, bottom = 0 }, margin = { top = 0, right = 1, bottom = 0 },
padding = true, padding = true,
sort = { "level", "added" }, sort = { 'level', 'added' },
level = vim.log.levels.TRACE, level = vim.log.levels.TRACE,
icons = { icons = {
debug = "", debug = '',
error = "", error = '',
info = "", info = '',
trace = "", trace = '',
warn = "", warn = '',
}, },
style = "compact", style = 'compact',
top_down = true, top_down = true,
date_format = "%R", date_format = '%R',
more_format = " ↓ %d lines ", more_format = ' ↓ %d lines ',
refresh = 50, refresh = 50,
}, },
notify = { enabled = true }, notify = { enabled = true },
picker = { picker = {
enabled = true, enabled = true,
icon = "", icon = '',
icon_hl = "SnacksPickerIcon", icon_hl = 'SnacksPickerIcon',
icon_pos = "left", icon_pos = 'left',
prompt_pos = "title", prompt_pos = 'title',
win = { style = "picker" }, win = { style = 'picker' },
expand = true, expand = true,
matchers = { matchers = {
frecency = true, frecency = true,
@@ -190,43 +189,43 @@ Snacks.setup({
layout = files_layout(), layout = files_layout(),
}, },
icons = { icons = {
icon_sources = { "nerd_fonts", "emoji" }, icon_sources = { 'nerd_fonts', 'emoji' },
layout = palette_layout(), layout = palette_layout(),
}, },
git_files = { layout = files_layout() }, git_files = { layout = files_layout() },
git_branches = { layout = { preset = "vertical" } }, git_branches = { layout = { preset = 'vertical' } },
git_status = { layout = files_layout() }, git_status = { layout = files_layout() },
help = { layout = { preset = "ivy_split" } }, help = { layout = { preset = 'ivy_split' } },
man = { layout = { preset = "ivy_split" } }, man = { layout = { preset = 'ivy_split' } },
notifications = { layout = palette_layout() }, notifications = { layout = palette_layout() },
projects = { projects = {
dev = { "~/Projects", "~/Projects/other" }, dev = { '~/Projects', '~/Projects/other' },
layout = files_layout(0.8), layout = files_layout(0.8),
}, },
recent = { layout = files_layout() }, recent = { layout = files_layout() },
search_history = { layout = palette_layout() }, search_history = { layout = palette_layout() },
smart = { layout = files_layout() }, smart = { layout = files_layout() },
undo = { layout = { preset = "ivy" } }, undo = { layout = { preset = 'ivy' } },
zoxide = { layout = files_layout(0.7) }, zoxide = { layout = files_layout(0.7) },
}, },
layout = "custom", layout = 'custom',
layouts = { layouts = {
custom = { custom = {
layout = { layout = {
box = "vertical", box = 'vertical',
backdrop = false, backdrop = false,
row = -1, row = -1,
width = 0, width = 0,
height = 0.4, height = 0.4,
border = "top", border = 'top',
title = " {title} {live} {flags}", title = ' {title} {live} {flags}',
title_pos = "left", title_pos = 'left',
{ {
box = "horizontal", box = 'horizontal',
{ win = "list", border = "rounded" }, { win = 'list', border = 'rounded' },
{ win = "preview", title = "{preview}", width = 0.6, border = "left" }, { win = 'preview', title = '{preview}', width = 0.6, border = 'left' },
}, },
{ win = "input", height = 1, border = "top" }, { win = 'input', height = 1, border = 'top' },
}, },
}, },
}, },
@@ -243,46 +242,46 @@ Snacks.setup({
edge = false, -- inner scope edge = false, -- inner scope
cursor = false, cursor = false,
treesitter = { blocks = { enabled = false } }, treesitter = { blocks = { enabled = false } },
desc = "inner scope", desc = 'inner scope',
}, },
ai = { ai = {
cursor = false, cursor = false,
min_size = 2, -- minimum size of the scope min_size = 2, -- minimum size of the scope
treesitter = { blocks = { enabled = false } }, treesitter = { blocks = { enabled = false } },
desc = "full scope", desc = 'full scope',
}, },
}, },
jump = { jump = {
["[a"] = { ['[a'] = {
min_size = 1, -- allow single line scopes min_size = 1, -- allow single line scopes
bottom = false, bottom = false,
cursor = false, cursor = false,
edge = true, edge = true,
treesitter = { blocks = { enabled = false } }, treesitter = { blocks = { enabled = false } },
desc = "jump to top edge of scope", desc = 'jump to top edge of scope',
}, },
["]a"] = { [']a'] = {
min_size = 1, -- allow single line scopes min_size = 1, -- allow single line scopes
bottom = true, bottom = true,
cursor = false, cursor = false,
edge = true, edge = true,
treesitter = { blocks = { enabled = false } }, treesitter = { blocks = { enabled = false } },
desc = "jump to bottom edge of scope", desc = 'jump to bottom edge of scope',
}, },
}, },
}, },
}, },
scratch = { scratch = {
enabled = true, enabled = true,
name = "SCRATCH", name = 'SCRATCH',
ft = function() ft = function()
if vim.bo.buftype == "" and vim.bo.filetype ~= "" then if vim.bo.buftype == '' and vim.bo.filetype ~= '' then
return vim.bo.filetype return vim.bo.filetype
end end
return "markdown" return 'markdown'
end, end,
icon = nil, icon = nil,
root = vim.fn.stdpath("data") .. "/scratch", root = vim.fn.stdpath('data') .. '/scratch',
autowrite = true, autowrite = true,
filekey = { filekey = {
cwd = true, cwd = true,
@@ -292,37 +291,37 @@ Snacks.setup({
win = { win = {
width = 120, width = 120,
height = 40, height = 40,
bo = { buftype = "", buflisted = false, bufhidden = "hide", swapfile = false }, bo = { buftype = '', buflisted = false, bufhidden = 'hide', swapfile = false },
minimal = false, minimal = false,
noautocmd = false, noautocmd = false,
zindex = 20, zindex = 20,
wo = { winhighlight = "NormalFloat:Normal" }, wo = { winhighlight = 'NormalFloat:Normal' },
border = "rounded", border = 'rounded',
title_pos = "center", title_pos = 'center',
footer_pos = "center", footer_pos = 'center',
keys = { keys = {
["execute"] = { ['execute'] = {
"<cr>", '<cr>',
function(_) function(_)
vim.cmd("%SnipRun") vim.cmd('%SnipRun')
end, end,
desc = "Execute buffer", desc = 'Execute buffer',
mode = { "n", "x" }, mode = { 'n', 'x' },
}, },
}, },
}, },
win_by_ft = { win_by_ft = {
lua = { lua = {
keys = { keys = {
["source"] = { ['source'] = {
"<leader>cr", '<leader>cr',
function(self) function(self)
local name = "scratch." .. vim.fn.fnamemodify(vim.api.nvim_buf_get_name(self.buf), ":e") local name = 'scratch.' .. vim.fn.fnamemodify(vim.api.nvim_buf_get_name(self.buf), ':e')
Snacks.debug.run({ buf = self.buf, name = name }) Snacks.debug.run({ buf = self.buf, name = name })
end, end,
desc = "Source buffer", desc = 'Source buffer',
mode = { "n", "x" }, mode = { 'n', 'x' },
}, },
}, },
}, },
@@ -332,14 +331,14 @@ Snacks.setup({
select = { enabled = true }, select = { enabled = true },
statuscolumn = { statuscolumn = {
enabled = true, -- Change this to false enabled = true, -- Change this to false
left = { "mark", "sign" }, left = { 'mark', 'sign' },
right = { "fold", "git" }, right = { 'fold', 'git' },
folds = { folds = {
open = false, open = false,
git_hl = false, git_hl = false,
}, },
git = { git = {
patterns = { "GitSign", "MiniDiffSign" }, patterns = { 'GitSign', 'MiniDiffSign' },
}, },
refresh = 50, refresh = 50,
}, },
@@ -360,7 +359,7 @@ Snacks.setup({
statusline = false, statusline = false,
tabline = false, tabline = false,
}, },
win = { style = "zen" }, win = { style = 'zen' },
zoom = { zoom = {
toggles = {}, toggles = {},
show = { statusline = true, tabline = true }, show = { statusline = true, tabline = true },