Added gitsigns and neogit for better integration with git

This commit is contained in:
Јован Ђокић-Шумарац 2023-08-02 19:45:54 +02:00
parent 7ce43027ff
commit 2d3a48a141
3 changed files with 85 additions and 7 deletions

48
lua/plugins/gitsigns.lua Normal file
View file

@ -0,0 +1,48 @@
require('gitsigns').setup {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '/' },
untracked = { text = '' },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
}

View file

@ -15,3 +15,6 @@ require("plugins.veil")
require("plugins.harpoon") require("plugins.harpoon")
require("plugins.hlblocks") require("plugins.hlblocks")
require("plugins.gitsigns")

View file

@ -22,26 +22,48 @@ vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ require("lazy").setup({
"navarasu/onedark.nvim", "navarasu/onedark.nvim",
"HiPhish/nvim-ts-rainbow2", "EdenEast/nightfox.nvim",
"folke/twilight.nvim", "folke/twilight.nvim",
"folke/zen-mode.nvim", "folke/zen-mode.nvim",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
"kassio/neoterm",
"bkad/camelcasemotion", "bkad/camelcasemotion",
"ggandor/lightspeed.nvim", "ThePrimeagen/harpoon",
"tpope/vim-commentary", "tpope/vim-commentary",
"ThePrimeagen/harpoon",
"eandrju/cellular-automaton.nvim", "eandrju/cellular-automaton.nvim",
"dbinagi/nomodoro", "dbinagi/nomodoro",
"EdenEast/nightfox.nvim",
-- indicate what has changed in git repo
"lewis6991/gitsigns.nvim",
-- like magit for emacs
{
"NeogitOrg/neogit",
dependencies = "nvim-lua/plenary.nvim",
config = true
},
-- Debugger UI
{
"rcarriga/nvim-dap-ui",
dependencies = {"mfussenegger/nvim-dap"}
},
-- Surround text with quotes etc
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
config = function()
require("nvim-surround").setup()
end
},
-- highlight current scope
{ {
"shellRaining/hlchunk.nvim", "shellRaining/hlchunk.nvim",
@ -50,6 +72,7 @@ require("lazy").setup({
}, },
-- Automagically close () "" and so on
{ {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',
event = "InsertEnter", event = "InsertEnter",
@ -58,6 +81,7 @@ require("lazy").setup({
-- better status line than stock one
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = dependencies =
@ -76,6 +100,7 @@ require("lazy").setup({
}, },
-- LEARN HJKL DAMMIT
{ {
"m4xshen/hardtime.nvim", "m4xshen/hardtime.nvim",
lazy = true, lazy = true,
@ -83,6 +108,7 @@ require("lazy").setup({
}, },
-- modern ui
{ {
"folke/noice.nvim", "folke/noice.nvim",
config = function () config = function ()
@ -91,6 +117,7 @@ require("lazy").setup({
}, },
-- dashboard and start page
{ {
"willothy/veil.nvim", "willothy/veil.nvim",
dependencies = { dependencies = {