go stuff & a mess more
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled

This commit is contained in:
2025-03-28 14:53:54 -04:00
parent bf3c2c8003
commit 3fc6fde51c
7 changed files with 156 additions and 32 deletions

View File

@@ -49,18 +49,69 @@ M.luasnip = function(opts)
})
end
-- M.gitsigns = {
-- signs = {
-- add = { text = "│" },
-- change = { text = "│" },
-- delete = { text = "󰍵" },
-- topdelete = { text = "‾" },
-- changedelete = { text = "~" },
-- untracked = { text = "│" },
-- },
-- on_attach = function(bufnr)
-- utils.load_mappings("gitsigns", { buffer = bufnr })
-- end,
-- }
M.gitsigns = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "󰍵" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "" },
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged_enable = true,
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
},
auto_attach = true,
attach_to_untracked = false,
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,
virt_text_priority = 100,
},
current_line_blame_formatter = '<author>, <author_time:%R> - <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
},
on_attach = function(bufnr)
utils.load_mappings("gitsigns", { buffer = bufnr })
end,
}
return M

View File

@@ -90,25 +90,26 @@ local default_plugins = {
-- git stuff
{
"lewis6991/gitsigns.nvim",
lazy = false,
ft = { "gitcommit", "diff" },
init = function()
-- load gitsigns only when a git file is opened
vim.api.nvim_create_autocmd({ "BufRead" }, {
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
callback = function()
vim.fn.jobstart({ "git", "-C", vim.loop.cwd(), "rev-parse" }, {
on_exit = function(_, return_code)
if return_code == 0 then
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
vim.schedule(function()
require("lazy").load { plugins = { "gitsigns.nvim" } }
end)
end
end,
})
end,
})
end,
-- init = function()
-- -- load gitsigns only when a git file is opened
-- vim.api.nvim_create_autocmd({ "BufRead" }, {
-- group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
-- callback = function()
-- vim.fn.jobstart({ "git", "-C", vim.loop.cwd(), "rev-parse" }, {
-- on_exit = function(_, return_code)
-- if return_code == 0 then
-- vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
-- vim.schedule(function()
-- require("lazy").load { plugins = { "gitsigns.nvim" } }
-- end)
-- end
-- end,
-- })
-- end,
-- })
-- end,
opts = function()
return require("plugins.configs.others").gitsigns
end,