aboutsummaryrefslogtreecommitdiff
path: root/lua/config/gitsigns.lua
diff options
context:
space:
mode:
authorMichal Hanus <hanus.michal@divelit.cz>2024-03-02 18:49:55 +0100
committerMichal Hanus <hanus.michal@divelit.cz>2024-03-02 18:49:55 +0100
commitaab38f32e0a02e43565a554d0a76ff65636499b8 (patch)
treef3f00df05c63228c69a338e80fd0e7d02986e8cf /lua/config/gitsigns.lua
parent99353a355321d68ef4fb3c26291084b23e8f4978 (diff)
crazyshitHEADmaster
Diffstat (limited to 'lua/config/gitsigns.lua')
-rw-r--r--lua/config/gitsigns.lua57
1 files changed, 0 insertions, 57 deletions
diff --git a/lua/config/gitsigns.lua b/lua/config/gitsigns.lua
deleted file mode 100644
index 0a7294c..0000000
--- a/lua/config/gitsigns.lua
+++ /dev/null
@@ -1,57 +0,0 @@
-local gs = require("gitsigns")
-
-gs.setup {
- signs = {
- add = { hl = "GitSignsAdd", text = "+", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
- change = { hl = "GitSignsChange", text = "~", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
- delete = { hl = "GitSignsDelete", text = "_", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
- topdelete = { hl = "GitSignsDelete", text = "‾", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
- changedelete = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
- },
- word_diff = true,
- on_attach = function(bufnr)
- local function map(mode, l, r, opts)
- opts = opts or {}
- opts.buffer = bufnr
- vim.keymap.set(mode, l, r, opts)
- end
-
- -- Navigation
- map("n", "]c", function()
- if vim.wo.diff then
- return "]c"
- end
- vim.schedule(function()
- gs.next_hunk()
- end)
- return "<Ignore>"
- end, { expr = true, desc = "next hunk" })
-
- map("n", "[c", function()
- if vim.wo.diff then
- return "[c"
- end
- vim.schedule(function()
- gs.prev_hunk()
- end)
- return "<Ignore>"
- end, { expr = true, desc = "previous hunk" })
-
- -- Actions
- map("n", "<leader>hp", gs.preview_hunk)
- map("n", "<leader>hb", function()
- gs.blame_line { full = true }
- end)
- end,
-}
-
-vim.api.nvim_create_autocmd('ColorScheme', {
- pattern = "*",
- callback = function()
- vim.cmd [[
- hi GitSignsChangeInline gui=reverse
- hi GitSignsAddInline gui=reverse
- hi GitSignsDeleteInline gui=reverse
- ]]
- end
-})