Added git integrations, refactor keymaps to vim-settings.lua
This commit is contained in:
parent
53dafa797f
commit
4dd8d14dff
2 changed files with 18 additions and 0 deletions
11
nvim/.config/nvim/lua/plugins/git.lua
Normal file
11
nvim/.config/nvim/lua/plugins/git.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"tpope/vim-fugitive"
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end
|
||||
}
|
||||
}
|
|
@ -4,3 +4,10 @@ vim.cmd("set softtabstop=2")
|
|||
vim.cmd("set shiftwidth=2")
|
||||
vim.cmd("set clipboard+=unnamedplus")
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Setup custom keybinds
|
||||
vim.keymap.set("n", "<C-n>", "<CMD>Neotree toggle<CR>") -- Open Neotree fs with CTRL - n
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action) -- Open Code actions with Space - ca
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover) -- Open information with captial K
|
||||
vim.keymap.set("n", "<leader>gp", "<CMD>Gitsigns preview_hunk<CR>") -- Open tab with changes with Space - gp
|
||||
vim.keymap.set("n", "<leader>gt", "<CMD>Gitsigns toggle_current_line_blame<CR>") -- Shows when and who changed with Space - gt
|
||||
|
|
Loading…
Reference in a new issue