diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..0f7d10c --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,11 @@ +return { + { + "tpope/vim-fugitive" + }, + { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup() + end + } +} diff --git a/nvim/.config/nvim/lua/vim-settings.lua b/nvim/.config/nvim/lua/vim-settings.lua index 97685f4..37ab5d6 100644 --- a/nvim/.config/nvim/lua/vim-settings.lua +++ b/nvim/.config/nvim/lua/vim-settings.lua @@ -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", "", "Neotree toggle") -- Open Neotree fs with CTRL - n +vim.keymap.set("n", "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", "gp", "Gitsigns preview_hunk") -- Open tab with changes with Space - gp +vim.keymap.set("n", "gt", "Gitsigns toggle_current_line_blame") -- Shows when and who changed with Space - gt