From 2b6ae8473e1b0fb8cc0bd16aa8c485a77ee5e847 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 16 Mar 2021 21:54:42 +0100 Subject: renaming, treesitter buggy --- .config/nvim/lua/_gitsigns/init.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .config/nvim/lua/_gitsigns/init.lua (limited to '.config/nvim/lua/_gitsigns/init.lua') diff --git a/.config/nvim/lua/_gitsigns/init.lua b/.config/nvim/lua/_gitsigns/init.lua new file mode 100644 index 0000000..b435be7 --- /dev/null +++ b/.config/nvim/lua/_gitsigns/init.lua @@ -0,0 +1,36 @@ +require('gitsigns').setup { + signs = { + -- TODO add hl to colorscheme + 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'}, + }, + numhl = false, + linehl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + + --[[ ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, + ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, + ['n hs'] = 'lua require"gitsigns".stage_hunk()', + ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', + ['n hr'] = 'lua require"gitsigns".reset_hunk()', + ['n hp'] = 'lua require"gitsigns".preview_hunk()', + ['n hb'] = 'lua require"gitsigns".blame_line()', ]] + + -- Text objects + --[[ ['o ih'] = ':lua require"gitsigns".text_object()', + ['x ih'] = ':lua require"gitsigns".text_object()' ]] + }, + watch_index = { + interval = 1000 + }, + sign_priority = 6, + update_debounce = 200, + status_formatter = nil, -- Use default + use_decoration_api = false +} -- cgit v1.2.3-70-g09d2