Add gitsigns keybinds, NatDat, Markdown extras
This commit is contained in:
parent
266a409d15
commit
d30e420578
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"extras": [
|
"extras": [
|
||||||
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
"lazyvim.plugins.extras.lang.rust",
|
"lazyvim.plugins.extras.lang.rust",
|
||||||
"lazyvim.plugins.extras.util.project"
|
"lazyvim.plugins.extras.util.project"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,53 @@
|
||||||
return {
|
return {
|
||||||
"gitsigns.nvim",
|
"gitsigns.nvim",
|
||||||
opts = { numhl = true },
|
opts = { numhl = true },
|
||||||
|
init = function()
|
||||||
|
local wk = require("which-key")
|
||||||
|
|
||||||
|
wk.register({ ["<leader>h"] = { name = "+hunk" } })
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>hs",
|
||||||
|
function()
|
||||||
|
package.loaded.gitsigns.stage_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Stage Hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>hr",
|
||||||
|
function()
|
||||||
|
package.loaded.gitsigns.reset_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Reset Hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>hS",
|
||||||
|
function()
|
||||||
|
package.loaded.gitsigns.stage_buffer()
|
||||||
|
end,
|
||||||
|
desc = "Stage Buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>hu",
|
||||||
|
function()
|
||||||
|
package.loaded.gitsigns.undo_stage_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Undo stage hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>hR",
|
||||||
|
function()
|
||||||
|
package.loaded.gitsigns.reset_buffer()
|
||||||
|
end,
|
||||||
|
desc = "Reset Buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>hp",
|
||||||
|
function()
|
||||||
|
package.loaded.gitsigns.preview_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Preview Hunk",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"Gelio/cmp-natdat",
|
||||||
|
opts = {
|
||||||
|
cmp_kind_text = "NatDat",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
local cmp = require("cmp")
|
||||||
|
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "natdat" } }))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue