diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 4b44f79..c822282 100755 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -9,5 +9,6 @@ "nvim-treesitter": { "branch": "master", "commit": "53a6b3993f5803378d4d031bf114c0b125a52ba8" }, "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, "rose-pine": { "branch": "main", "commit": "00ec4cec924b624920baac9d42eac02e1efcae76" }, - "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" } + "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" }, + "vim-fugitive": { "branch": "master", "commit": "b068eaf1e6cbe35d1ac100d435cd7f7b74a5c87d" } } diff --git a/.config/nvim/lua/rocketcamel/plugins/fugitive.lua b/.config/nvim/lua/rocketcamel/plugins/fugitive.lua new file mode 100644 index 0000000..c0c159d --- /dev/null +++ b/.config/nvim/lua/rocketcamel/plugins/fugitive.lua @@ -0,0 +1,3 @@ +return { + { "tpope/vim-fugitive" }, +} diff --git a/.config/nvim/lua/rocketcamel/remap.lua b/.config/nvim/lua/rocketcamel/remap.lua index b9f880a..6f88aa8 100755 --- a/.config/nvim/lua/rocketcamel/remap.lua +++ b/.config/nvim/lua/rocketcamel/remap.lua @@ -5,3 +5,12 @@ vim.keymap.set("i", "", "", { noremap = true, silent = true }) vim.keymap.set("i", "", "", { noremap = true, silent = false }) vim.keymap.set("i", "", "", { noremap = true, silent = true }) vim.keymap.set("v", "y", '"+y', { noremap = true, silent = true }) +vim.keymap.set("n", "gs", vim.cmd.Git) +vim.keymap.set("n", "gc", ":Git commit", { desc = "Git commit" }) +vim.keymap.set("n", "ga", function() + vim.ui.input({ prompt = "Git add: " }, function(input) + if input then + vim.cmd("Git add " .. input) + end + end) +end)