diff --git a/lazyvim.json b/lazyvim.json index 8b16f9b..ee6c23c 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -1,5 +1,6 @@ { "extras": [ + "lazyvim.plugins.extras.lang.markdown", "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.util.project" ], diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index c2281bb..3b73ddf 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,4 +1,53 @@ return { "gitsigns.nvim", opts = { numhl = true }, + init = function() + local wk = require("which-key") + + wk.register({ ["h"] = { name = "+hunk" } }) + end, + keys = { + { + "hs", + function() + package.loaded.gitsigns.stage_hunk() + end, + desc = "Stage Hunk", + }, + { + "hr", + function() + package.loaded.gitsigns.reset_hunk() + end, + desc = "Reset Hunk", + }, + { + "hS", + function() + package.loaded.gitsigns.stage_buffer() + end, + desc = "Stage Buffer", + }, + { + "hu", + function() + package.loaded.gitsigns.undo_stage_hunk() + end, + desc = "Undo stage hunk", + }, + { + "hR", + function() + package.loaded.gitsigns.reset_buffer() + end, + desc = "Reset Buffer", + }, + { + "hp", + function() + package.loaded.gitsigns.preview_hunk() + end, + desc = "Preview Hunk", + }, + }, } diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua new file mode 100644 index 0000000..0eb2d0c --- /dev/null +++ b/lua/plugins/nvim-cmp.lua @@ -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, + }, +}