From 9fb0d124b464804a52bfd373df11fc2fb8cc6952 Mon Sep 17 00:00:00 2001 From: Tine Date: Thu, 25 Apr 2024 11:12:44 +0200 Subject: [PATCH] chore: keybindings and git --- nix/core.nix | 6 ++++++ nvim/init.lua | 2 ++ nvim/lua/code_helpers.lua | 3 +++ nvim/lua/keybindings.lua | 6 +++--- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/nix/core.nix b/nix/core.nix index 6363196..83812ea 100644 --- a/nix/core.nix +++ b/nix/core.nix @@ -144,6 +144,12 @@ pull = { ff = "only"; }; + + url = { + "git@github.com:" = { + insteadOf = "https://github.com/"; + }; + }; }; }; diff --git a/nvim/init.lua b/nvim/init.lua index d59ca71..3b568de 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -16,6 +16,8 @@ Plug("norcalli/nvim-colorizer.lua") Plug("j-hui/fidget.nvim") -- Git Plug("lewis6991/gitsigns.nvim") +Plug("NeogitOrg/neogit") +Plug("sindrets/diffview.nvim") -- Search/Files Plug("nvim-lua/plenary.nvim") Plug("nvim-telescope/telescope.nvim") diff --git a/nvim/lua/code_helpers.lua b/nvim/lua/code_helpers.lua index e3f9225..e58042f 100644 --- a/nvim/lua/code_helpers.lua +++ b/nvim/lua/code_helpers.lua @@ -244,3 +244,6 @@ autocmd("BufWritePost", { }) require("trouble").setup({}) + +-- Git +require("neogit").setup({}) diff --git a/nvim/lua/keybindings.lua b/nvim/lua/keybindings.lua index 6a7aba2..8920477 100644 --- a/nvim/lua/keybindings.lua +++ b/nvim/lua/keybindings.lua @@ -43,20 +43,20 @@ vim.api.nvim_create_autocmd("LspAttach", { { desc = "LSP Rename", cmd = vim.lsp.buf.rename, keys = { "n", "rn", opts } }, { desc = "LSP Implementation", cmd = vim.lsp.buf.implementation, keys = { "n", "gi", opts } }, { desc = "LSP Signature Help", cmd = vim.lsp.buf.signature_help, keys = { "n", "", opts } }, - { desc = "LSP Code Action", cmd = vim.lsp.buf.code_action, keys = { "n", "ca", opts } }, + { desc = "LSP Code Action", cmd = vim.lsp.buf.code_action, keys = { "n", "ca", opts } }, { desc = "LSP Format", cmd = function() vim.lsp.buf.format({ async = true }) end, - keys = { "n", "f", opts }, + keys = { "n", "f", opts }, }, { desc = "LSP Diagnostics", cmd = function() require("trouble").toggle("document_diagnostics") end, - keys = { "n", "d" }, + keys = { "n", "d" }, }, { desc = "LSP Diagnostics whole workspace",