add sources to null-ls

This commit is contained in:
xesc 2025-02-23 22:30:52 +01:00
parent bdf75e4c1d
commit 6458c24d8a
21 changed files with 638 additions and 627 deletions

View file

@ -1,39 +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,
}
}