This commit is contained in:
siduck76 2021-03-07 20:49:51 +05:30
parent 9c46ffb5d3
commit e63b9dfa60
5 changed files with 32 additions and 0 deletions

View file

@ -3,6 +3,7 @@ require('pluginsList.lua')
require('utils.lua') require('utils.lua')
require('nvimTree.lua') require('nvimTree.lua')
require('gitsigns.lua')
require('lsp_config.lua') require('lsp_config.lua')
require'colorizer'.setup() require'colorizer'.setup()

29
lua/gitsigns/lua.lua Normal file
View file

@ -0,0 +1,29 @@
require('gitsigns').setup {
signs = {
add = {hl = 'DiffAdd' , text = '', numhl='GitSignsAddNr'},
change = {hl = 'DiffChange', text = '', numhl='GitSignsChangeNr'},
delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'},
topdelete = {hl = 'DiffDelete', text = '', numhl='GitSignsDeleteNr'},
changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'},
},
numhl = false,
keymaps = {
-- Default keymap options
noremap = true,
buffer = true,
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
['n <leader>hp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
['n <leader>hb'] = '<cmd>lua require"gitsigns".blame_line()<CR>',
},
watch_index = {
interval = 100
},
sign_priority = 5,
status_formatter = nil, -- Use default
}

View file

@ -54,6 +54,7 @@ end
local servers = { "html" , "cssls" , "tsserver"} local servers = { "html" , "cssls" , "tsserver"}
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup { on_attach = on_attach } nvim_lsp[lsp].setup { on_attach = on_attach }
require"completion".on_attach(client)
end end
-- keybinds -- keybinds

View file

@ -7,3 +7,4 @@ end
-- keybind list -- keybind list
map('', '<leader>c', '"+y') map('', '<leader>c', '"+y')
--map('' , '<C-a>' , '%y+')

View file