From 799656c3cc769343f93ce152da72c17e174aeac1 Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Sat, 7 Dec 2024 12:22:25 -0300 Subject: [PATCH] feat(ide): gitsigns and git line blame --- lua/dot013/plugins/ide.lua | 27 +++++++++++++++++++++++++++ neovim.nix | 1 + 2 files changed, 28 insertions(+) diff --git a/lua/dot013/plugins/ide.lua b/lua/dot013/plugins/ide.lua index e26137f..1c7629d 100644 --- a/lua/dot013/plugins/ide.lua +++ b/lua/dot013/plugins/ide.lua @@ -116,6 +116,33 @@ return { end, }, + -- Git integration, enabled just in git repos { + "gitsigns.nvim", + cmd = "Gitsigns", + keys = { + { + "gt", + "Gitsigns toggle_current_line_blame", + desc = "[Git] Toggle line blame", + }, + }, + enabled = require("dot013.utils").is_in_cwd(".git"), + lazy = not require("dot013.utils").is_in_cwd(".git"), + after = function() + require("gitsigns").setup({ + signs = { + add = { text = "+" }, + change = { text = "~" }, + delete = { text = "+" }, + topdelete = { text = "-" }, + changedelete = { text = "~" }, + }, + current_line_blame = false, + current_line_blame_opts = { + delay = 0, + }, + }) + end, }, } diff --git a/neovim.nix b/neovim.nix index bc33760..ecabf43 100644 --- a/neovim.nix +++ b/neovim.nix @@ -30,6 +30,7 @@ blink-cmp cloak-nvim friendly-snippets + gitsigns-nvim harpoon2 lualine-nvim luasnip