chore: keybindings and git

This commit is contained in:
Tine 2024-04-25 11:12:44 +02:00
parent eab51deeff
commit 9fb0d124b4
No known key found for this signature in database
4 changed files with 14 additions and 3 deletions

View file

@ -144,6 +144,12 @@
pull = { pull = {
ff = "only"; ff = "only";
}; };
url = {
"git@github.com:" = {
insteadOf = "https://github.com/";
};
};
}; };
}; };

View file

@ -16,6 +16,8 @@ Plug("norcalli/nvim-colorizer.lua")
Plug("j-hui/fidget.nvim") Plug("j-hui/fidget.nvim")
-- Git -- Git
Plug("lewis6991/gitsigns.nvim") Plug("lewis6991/gitsigns.nvim")
Plug("NeogitOrg/neogit")
Plug("sindrets/diffview.nvim")
-- Search/Files -- Search/Files
Plug("nvim-lua/plenary.nvim") Plug("nvim-lua/plenary.nvim")
Plug("nvim-telescope/telescope.nvim") Plug("nvim-telescope/telescope.nvim")

View file

@ -244,3 +244,6 @@ autocmd("BufWritePost", {
}) })
require("trouble").setup({}) require("trouble").setup({})
-- Git
require("neogit").setup({})

View file

@ -43,20 +43,20 @@ vim.api.nvim_create_autocmd("LspAttach", {
{ desc = "LSP Rename", cmd = vim.lsp.buf.rename, keys = { "n", "rn", opts } }, { 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 Implementation", cmd = vim.lsp.buf.implementation, keys = { "n", "gi", opts } },
{ desc = "LSP Signature Help", cmd = vim.lsp.buf.signature_help, keys = { "n", "<C-k>", opts } }, { desc = "LSP Signature Help", cmd = vim.lsp.buf.signature_help, keys = { "n", "<C-k>", opts } },
{ desc = "LSP Code Action", cmd = vim.lsp.buf.code_action, keys = { "n", "<space>ca", opts } }, { desc = "LSP Code Action", cmd = vim.lsp.buf.code_action, keys = { "n", "<leader>ca", opts } },
{ {
desc = "LSP Format", desc = "LSP Format",
cmd = function() cmd = function()
vim.lsp.buf.format({ async = true }) vim.lsp.buf.format({ async = true })
end, end,
keys = { "n", "<space>f", opts }, keys = { "n", "<leader>f", opts },
}, },
{ {
desc = "LSP Diagnostics", desc = "LSP Diagnostics",
cmd = function() cmd = function()
require("trouble").toggle("document_diagnostics") require("trouble").toggle("document_diagnostics")
end, end,
keys = { "n", "<space>d" }, keys = { "n", "<leader>d" },
}, },
{ {
desc = "LSP Diagnostics whole workspace", desc = "LSP Diagnostics whole workspace",