Initial plugin setup (#1)

This adds a basic layer of plugins. But more language and workflow specific plugins are to follow possibly.
This commit is contained in:
Aditya Ravichandran 2025-03-30 19:23:37 +05:30
parent 3338d39206
commit 4803eec76b
6 changed files with 109 additions and 16 deletions

View file

@ -0,0 +1,30 @@
-- File navigation using neo-tree
return {
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
},
lazy = false, -- neo-tree will lazily load itself
---@module "neo-tree"
---@type neotree.Config?
config = function()
require('neo-tree').setup {
event_handlers = {
{
event = 'file_open_requested',
handler = function()
-- auto close
vim.cmd 'Neotree close'
end,
},
},
}
end,
opts = {
-- fill any relevant options here
},
}

View file

@ -0,0 +1,21 @@
-- lazygit integration into nvim
return {
'kdheepak/lazygit.nvim',
lazy = true,
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
-- optional for floating window border decoration
dependencies = {
'nvim-lua/plenary.nvim',
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
},
}

View file

@ -0,0 +1,9 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
}

View file

@ -0,0 +1,25 @@
return {
{
'goolord/alpha-nvim',
config = function()
local dashboard = require 'alpha.themes.dashboard'
local title = {
'███╗░░░███╗░█████╗░███████╗░█████╗░██╗░░░██╗░░░███╗░░██╗██╗░░░██╗██╗███╗░░░███╗',
'████╗░████║██╔══██╗╚════██║██╔══██╗██║░░░██║░░░████╗░██║██║░░░██║██║████╗░████║',
'██╔████╔██║███████║░░███╔═╝██║░░██║╚██╗░██╔╝░░░██╔██╗██║╚██╗░██╔╝██║██╔████╔██║',
'██║╚██╔╝██║██╔══██║██╔══╝░░██║░░██║░╚████╔╝░░░░██║╚████║░╚████╔╝░██║██║╚██╔╝██║',
'██║░╚═╝░██║██║░░██║███████╗╚█████╔╝░░╚██╔╝░░██╗██║░╚███║░░╚██╔╝░░██║██║░╚═╝░██║',
'╚═╝░░░░░╚═╝╚═╝░░╚═╝╚══════╝░╚════╝░░░░╚═╝░░░╚═╝╚═╝░░╚══╝░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝',
}
dashboard.section.header.val = title
require('alpha').setup(dashboard.opts)
end,
},
{
'echansnovski/mini.nvim',
version = false,
},
{
'tpope/vim-repeat',
},
}

View file

@ -34,22 +34,22 @@ return {
-- Actions
-- visual mode
map('v', '<leader>hs', function()
map('v', '<leader>gs', function()
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
end, { desc = 'git [s]tage hunk' })
map('v', '<leader>hr', function()
map('v', '<leader>gr', function()
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
end, { desc = 'git [r]eset hunk' })
-- normal mode
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
map('n', '<leader>hD', function()
map('n', '<leader>gs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
map('n', '<leader>gr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
map('n', '<leader>gS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
map('n', '<leader>gu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
map('n', '<leader>gR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
map('n', '<leader>gp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
map('n', '<leader>gb', gitsigns.blame_line, { desc = 'git [b]lame line' })
map('n', '<leader>gd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
map('n', '<leader>gD', function()
gitsigns.diffthis '@'
end, { desc = 'git [D]iff against last commit' })
-- Toggles