Added git integrations

This commit is contained in:
Rakshit Sinha 2024-11-22 23:59:38 -08:00
parent fa86cfebf5
commit 8fd602a27e
5 changed files with 86 additions and 59 deletions

View file

@ -0,0 +1,19 @@
return {
"f-person/git-blame.nvim",
-- load the plugin at startup
event = "VeryLazy",
-- Because of the keys part, you will be lazy loading this plugin.
-- The plugin wil only load once one of the keys is used.
-- If you want to load the plugin at startup, add something like event = "VeryLazy",
-- or lazy = false. One of both options will work.
opts = {
-- your configuration comes here
-- for example
enabled = true, -- if you want to enable the plugin
message_template = " <author> • <date> • <summary> • <<sha>>", -- template for the blame message, check the Message template section for more options
date_format = "%m-%d-%Y", -- template for the date, check Date format section for more options
virtual_text_column = 80, -- virtual text start column, check Start virtual text at column section for more options
message_when_not_committed = "Not committed yet",
display_virtual_text = 1,
},
}

View file

@ -0,0 +1,19 @@
return {
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
-- require('gitsigns').setup({ ... })
--
-- See `:help gitsigns` to understand what the configuration keys do
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
"lewis6991/gitsigns.nvim",
opts = {
signs = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
},
},
},
}

View file

@ -1,8 +1,8 @@
return {
'nvim-lua/plenary.nvim', -- lua functions that many plugins use
'christoomey/vim-tmux-navigator', -- tmux % split window navigation
"nvim-lua/plenary.nvim", -- lua functions that many plugins use
"christoomey/vim-tmux-navigator", -- tmux % split window navigation
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically
-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
@ -11,40 +11,22 @@ return {
-- Use `opts = {}` to force a plugin to be loaded.
--
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
-- require('gitsigns').setup({ ... })
--
-- See `:help gitsigns` to understand what the configuration keys do
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
},
},
-- LSP Plugins
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
{ path = "luvit-meta/library", words = { "vim%.uv" } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{ "Bilal2453/luvit-meta", lazy = true },
{ -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim',
"echasnovski/mini.nvim",
config = function()
-- Better Around/Inside textobjects
--
@ -52,7 +34,7 @@ return {
-- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
-- - ci' - [C]hange [I]nside [']quote
require('mini.ai').setup { n_lines = 500 }
require("mini.ai").setup({ n_lines = 500 })
-- Add/delete/replace surroundings (brackets, quotes, etc.)
--
@ -64,16 +46,16 @@ return {
-- Simple and easy statusline.
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
local statusline = require("mini.statusline")
-- set use_icons to true if you have a Nerd Font
statusline.setup { use_icons = vim.g.have_nerd_font }
statusline.setup({ use_icons = vim.g.have_nerd_font })
-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for
-- cursor location to LINE:COLUMN
---@diagnostic disable-next-line: duplicate-set-field
statusline.section_location = function()
return '%2l:%-2v'
return "%2l:%-2v"
end
-- ... and there is more!

View file

@ -0,0 +1,3 @@
return {
"tpope/vim-fugitive",
}