update lsp, keymaps, format and some other settings
This commit is contained in:
parent
c8a9410ad7
commit
49c040e36e
25 changed files with 423 additions and 861 deletions
|
@ -1,40 +1,39 @@
|
|||
return {
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
preview_config = {
|
||||
border = 'rounded',
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
preview_config = {
|
||||
border = 'rounded',
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
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 })
|
||||
-- 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 })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>gB', function() gs.blame_line { full = true } end)
|
||||
map('n', '<leader>gb', gs.toggle_current_line_blame)
|
||||
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
-- Actions
|
||||
map('n', '<leader>gB', function() gs.blame_line { full = true } end)
|
||||
map('n', '<leader>gb', gs.toggle_current_line_blame)
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue