chore(lua/plugins): cleanup and reorganize plugin configurations, dropping deprecated plugins and introducing new folding, smoothing, and screenshot tools

New Features:
- Added ufo.nvim for advanced folding with Treesitter and indent providers
- Added neoscroll.nvim for smooth scrolling
- Added smartcolumn.nvim to enforce colorcolumn only when needed
- Added codesnap.nvim for markdown screenshot generation
- Added Markview toggle shortcut for markdown preview

Enhancements:
- Configured folding options (foldcolumn, foldlevel, provider selector)
- Added keybindings for opening/closing all folds and toggling fold visibility
- Updated plugin loading conditions and lazy loading patterns

Bug Fixes: — No bug fixes included in this change —
This commit is contained in:
sankalp committed 2026-02-20 23:55:19 +05:45
1 parent 9e2126314b
commit f93e579294
6 files changed
+259 -234

No files matched your search

+6 -82
View File
@@ -80,56 +80,6 @@ return {
end, end,
}, },
-- auto pairs
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = function()
local npairs = require('nvim-autopairs')
local Rule = require('nvim-autopairs.rule')
local conds = require('nvim-autopairs.conds')
npairs.setup()
-- Autoclosing angle-brackets.
npairs.add_rule(Rule('<', '>', {
-- Avoid conflicts with nvim-ts-autotag.
'-html',
'-javascriptreact',
'-typescriptreact',
}):with_pair(conds.before_regex('%a+:?:?$', 3)):with_move(function(opts)
return opts.char == '>'
end))
end,
},
-- auto tag
{
'windwp/nvim-ts-autotag',
ft = {
'html',
'xml',
'javascript',
'typescript',
'javascriptreact',
'typescriptreact',
'jsx',
'tsx',
'vue',
'svelte',
'markdown',
'htmldjango',
},
event = 'InsertEnter',
lazy = true,
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
},
-- comment -- comment
{ {
'numToStr/Comment.nvim', 'numToStr/Comment.nvim',
@@ -146,35 +96,15 @@ return {
}) })
end, end,
keys = { keys = {
{ 'gcc', mode = 'n', desc = 'Toggle comment line' }, { 'gcc', mode = 'n', desc = 'Toggle comment line' },
{ 'gc', mode = { 'n', 'o' }, desc = 'Toggle comment linewise' }, { 'gc', mode = { 'n', 'o' }, desc = 'Toggle comment linewise' },
{ 'gc', mode = 'x', desc = 'Toggle comment linewise (visual)' }, { 'gc', mode = 'x', desc = 'Toggle comment linewise (visual)' },
{ 'gbc', mode = 'n', desc = 'Toggle comment block' }, { 'gbc', mode = 'n', desc = 'Toggle comment block' },
{ 'gb', mode = { 'n', 'o' }, desc = 'Toggle comment blockwise' }, { 'gb', mode = { 'n', 'o' }, desc = 'Toggle comment blockwise' },
{ 'gb', mode = 'x', desc = 'Toggle comment blockwise (visual)' }, { 'gb', mode = 'x', desc = 'Toggle comment blockwise (visual)' },
}, },
}, },
-- treesitter
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
event = { 'BufReadPost', 'BufNewFile' },
config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = require('config.extensions').ts_parsers,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = true,
},
indent = {
enable = true,
},
})
end,
},
-- annotation generator -- annotation generator
{ {
'danymat/neogen', 'danymat/neogen',
@@ -189,10 +119,4 @@ return {
}, },
}, },
}, },
-- syntax highlight for mdx
{
'davidmh/mdx.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
},
} }
-123
View File
@@ -1,63 +1,4 @@
return { return {
-- gitignore generator
{
'wintermute-cell/gitignore.nvim',
cmd = { 'Gitignore' },
opts = {},
},
-- git signs
{
'lewis6991/gitsigns.nvim',
events = { 'BufReadPost', 'BufNewFile' },
opts = {
signcolumn = true,
current_line_blame = true,
attach_to_untracked = false,
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
watch_gitdir = {
follow_files = true,
},
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
use_focus = true,
},
signs = {
add = { text = '' },
change = { text = '󱗜 ' },
delete = { text = '󰍵 ' },
topdelete = { text = '󱥨 ' },
changedelete = { text = '󰾟 ' },
untracked = { text = '󰰧 ' },
},
},
},
-- lazygit integration
{
'kdheepak/lazygit.nvim',
lazy = true,
enabled = true,
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
keys = {
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
},
config = function()
vim.g.lazygit_floating_window_winblend = 0
vim.g.lazygit_floating_window_scaling_factor = 0.9
vim.g.lazygit_floating_window_border_chars = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }
end,
},
-- Todo Comments -- Todo Comments
{ {
@@ -162,70 +103,6 @@ return {
}, },
}, },
-- Better folding
{
'kevinhwang91/nvim-ufo',
dependencies = 'kevinhwang91/promise-async',
event = 'BufReadPost',
keys = {
{
'zR',
function()
require('ufo').openAllFolds()
end,
},
{
'zM',
function()
require('ufo').closeAllFolds()
end,
},
{
'zr',
function()
require('ufo').openFoldsExceptKinds()
end,
},
{
'zm',
function()
require('ufo').closeFoldsWith()
end,
},
},
config = function()
vim.o.foldcolumn = '1'
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
require('ufo').setup({
provider_selector = function()
return { 'treesitter', 'indent' }
end,
})
end,
},
-- rendering for html and markdown
{
'OXY2DEV/markview.nvim',
lazy = false,
-- to load before treesitter
priority = 45,
config = function()
require('markview').setup({
preview = {
icon_provider = 'mini',
enable = false,
},
})
end,
keys = {
{ '<leader>cv', '<Cmd>Markview toggle<CR>', desc = 'Toggle markdown preview', mode = 'n' },
},
},
-- markdown preview -- markdown preview
{ {
'iamcco/markdown-preview.nvim', 'iamcco/markdown-preview.nvim',
+61
View File
@@ -0,0 +1,61 @@
return {
-- gitignore generator
{
'wintermute-cell/gitignore.nvim',
cmd = { 'Gitignore' },
opts = {},
},
-- git signs
{
'lewis6991/gitsigns.nvim',
events = { 'BufReadPost', 'BufNewFile' },
opts = {
signcolumn = true,
current_line_blame = true,
attach_to_untracked = false,
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
watch_gitdir = {
follow_files = true,
},
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
use_focus = true,
},
signs = {
add = { text = '' },
change = { text = '󱗜 ' },
delete = { text = '󰍵 ' },
topdelete = { text = '󱥨 ' },
changedelete = { text = '󰾟 ' },
untracked = { text = '󰰧 ' },
},
},
},
-- lazygit integration
{
'kdheepak/lazygit.nvim',
lazy = true,
enabled = true,
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
keys = {
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
},
config = function()
vim.g.lazygit_floating_window_winblend = 0
vim.g.lazygit_floating_window_scaling_factor = 0.9
vim.g.lazygit_floating_window_border_chars = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }
end,
},
}
+78
View File
@@ -0,0 +1,78 @@
return {
-- treesitter
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
event = { 'BufReadPost', 'BufNewFile' },
config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = require('config.extensions').ts_parsers,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = true,
},
indent = {
enable = true,
},
})
end,
},
-- auto pairs
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = function()
local npairs = require('nvim-autopairs')
local Rule = require('nvim-autopairs.rule')
local conds = require('nvim-autopairs.conds')
npairs.setup()
-- Autoclosing angle-brackets.
npairs.add_rule(Rule('<', '>', {
-- Avoid conflicts with nvim-ts-autotag.
'-html',
'-javascriptreact',
'-typescriptreact',
}):with_pair(conds.before_regex('%a+:?:?$', 3)):with_move(function(opts)
return opts.char == '>'
end))
end,
},
-- auto tag
{
'windwp/nvim-ts-autotag',
ft = {
'html',
'xml',
'javascript',
'typescript',
'javascriptreact',
'typescriptreact',
'jsx',
'tsx',
'vue',
'svelte',
'markdown',
'htmldjango',
},
event = 'InsertEnter',
lazy = true,
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
},
-- syntax highlight for mdx
{
'davidmh/mdx.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
},
}
+114
View File
@@ -0,0 +1,114 @@
return {
-- rendering for html and markdown
{
'OXY2DEV/markview.nvim',
lazy = false,
-- to load before treesitter
priority = 45,
config = function()
require('markview').setup({
preview = {
icon_provider = 'mini',
enable = false,
},
})
end,
keys = {
{ '<leader>cv', '<Cmd>Markview toggle<CR>', desc = 'Toggle markdown preview', mode = 'n' },
},
},
-- Better folding
{
'kevinhwang91/nvim-ufo',
dependencies = 'kevinhwang91/promise-async',
event = 'BufReadPost',
keys = {
{
'zR',
function()
require('ufo').openAllFolds()
end,
},
{
'zM',
function()
require('ufo').closeAllFolds()
end,
},
{
'zr',
function()
require('ufo').openFoldsExceptKinds()
end,
},
{
'zm',
function()
require('ufo').closeFoldsWith()
end,
},
},
config = function()
vim.o.foldcolumn = '1'
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
require('ufo').setup({
provider_selector = function()
return { 'treesitter', 'indent' }
end,
})
end,
},
-- smooth scrolling
{
'karb94/neoscroll.nvim',
opts = {},
},
-- Smart column (colorcolumn only when needed)
{
'm4xshen/smartcolumn.nvim',
event = { 'BufReadPost', 'BufNewFile' },
opts = {
colorcolumn = '120',
disabled_filetypes = {
'help',
'text',
'markdown',
'dashboard',
'snacks_dashboard',
'lazy',
'mason',
'oil',
},
},
},
-- Screenshot Tool
{
'mistricky/codesnap.nvim',
build = 'make',
cmd = {
'CodeSnap',
'CodeSnapSave',
'CodeSnapHighlight',
'CodeSnapSaveHighlight',
'CodeSnapASCII',
},
opts = {
bg_theme = 'dusk',
code_font_family = 'JetBrainsMono Nerd Font',
save_path = os.getenv('XDG_SCREENSHOTS_DIR') or (os.getenv('HOME') .. '/Pictures'),
watermark = 'SANKALP',
watermark_font_family = 'Anurati',
has_breadcrumbs = true,
breadcrumbs_separator = '/',
has_line_number = true,
},
},
}
-29
View File
@@ -72,12 +72,6 @@ return {
end, end,
}, },
-- smooth scrolling
{
'karb94/neoscroll.nvim',
opts = {},
},
-- discord presence -- discord presence
-- { -- {
-- "vyfor/cord.nvim", -- "vyfor/cord.nvim",
@@ -117,29 +111,6 @@ return {
opts = {}, opts = {},
}, },
-- Screenshot Tool
{
'mistricky/codesnap.nvim',
build = 'make',
cmd = {
'CodeSnap',
'CodeSnapSave',
'CodeSnapHighlight',
'CodeSnapSaveHighlight',
'CodeSnapASCII',
},
opts = {
bg_theme = 'dusk',
code_font_family = 'JetBrainsMono Nerd Font',
save_path = os.getenv('XDG_SCREENSHOTS_DIR') or (os.getenv('HOME') .. '/Pictures'),
watermark = 'SANKALP',
watermark_font_family = 'Anurati',
has_breadcrumbs = true,
breadcrumbs_separator = '/',
has_line_number = true,
},
},
-- buffer manager -- buffer manager
{ {
'serhez/bento.nvim', 'serhez/bento.nvim',