diff options
Diffstat (limited to '.config/nvim/lua/plugin_settings.lua')
-rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index bff9bcb..ddc7371 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua | |||
@@ -462,3 +462,73 @@ require'nvim-tree'.setup { | |||
462 | -- nvim-colorizer {{{ -- | 462 | -- nvim-colorizer {{{ -- |
463 | require 'colorizer'.setup() | 463 | require 'colorizer'.setup() |
464 | -- }}} nvim-colorizer -- | 464 | -- }}} nvim-colorizer -- |
465 | |||
466 | -- gitsigns.nvim {{{ -- | ||
467 | |||
468 | require('gitsigns').setup { | ||
469 | signs = { | ||
470 | add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, | ||
471 | change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, | ||
472 | delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, | ||
473 | topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, | ||
474 | changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, | ||
475 | |||
476 | }, | ||
477 | signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` | ||
478 | numhl = false, -- Toggle with `:Gitsigns toggle_numhl` | ||
479 | linehl = false, -- Toggle with `:Gitsigns toggle_linehl` | ||
480 | word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` | ||
481 | keymaps = { | ||
482 | -- Default keymap options | ||
483 | noremap = true, | ||
484 | |||
485 | ['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns.actions\".next_hunk()<CR>'"}, | ||
486 | ['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns.actions\".prev_hunk()<CR>'"}, | ||
487 | |||
488 | ['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>', | ||
489 | ['v <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>', | ||
490 | ['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>', | ||
491 | ['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>', | ||
492 | ['v <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>', | ||
493 | ['n <leader>hR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>', | ||
494 | ['n <leader>hp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>', | ||
495 | ['n <leader>hb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>', | ||
496 | ['n <leader>hS'] = '<cmd>lua require"gitsigns".stage_buffer()<CR>', | ||
497 | ['n <leader>hU'] = '<cmd>lua require"gitsigns".reset_buffer_index()<CR>', | ||
498 | |||
499 | -- Text objects | ||
500 | ['o ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>', | ||
501 | ['x ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>' | ||
502 | }, | ||
503 | watch_gitdir = { | ||
504 | interval = 1000, | ||
505 | follow_files = true | ||
506 | }, | ||
507 | attach_to_untracked = true, | ||
508 | current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` | ||
509 | current_line_blame_opts = { | ||
510 | virt_text = true, | ||
511 | virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' | ||
512 | delay = 1000, | ||
513 | }, | ||
514 | current_line_blame_formatter_opts = { | ||
515 | relative_time = false | ||
516 | }, | ||
517 | sign_priority = 6, | ||
518 | update_debounce = 100, | ||
519 | status_formatter = nil, -- Use default | ||
520 | max_file_length = 40000, | ||
521 | preview_config = { | ||
522 | -- Options passed to nvim_open_win | ||
523 | border = 'single', | ||
524 | style = 'minimal', | ||
525 | relative = 'cursor', | ||
526 | row = 0, | ||
527 | col = 1 | ||
528 | }, | ||
529 | yadm = { | ||
530 | enable = true | ||
531 | }, | ||
532 | } | ||
533 | |||
534 | -- }}} gitsigns.nvim -- | ||