Compare commits
2 commits
b6f577d9ff
...
2fc217a01d
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fc217a01d | |||
| c525a3e6e4 |
2 changed files with 21 additions and 42 deletions
|
|
@ -11,8 +11,8 @@
|
||||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "687fa868d869078194c02065628712982d971fd6" },
|
"mini.nvim": { "branch": "main", "commit": "687fa868d869078194c02065628712982d971fd6" },
|
||||||
"newpaper.nvim": { "branch": "main", "commit": "d8f2a29001f795a59e4f28713427c200c15449ea" },
|
"newpaper.nvim": { "branch": "main", "commit": "d8f2a29001f795a59e4f28713427c200c15449ea" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "93b8040115c9114dac1047311763bef275e752dc" },
|
"nvim-lint": { "branch": "master", "commit": "81e8ba7655cc4395b1092ef4e1b6e83f54cd54ad" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "30654ee72a69e7c76a54b66d748dae088429e863" },
|
"nvim-treesitter": { "branch": "master", "commit": "997288c55253e27f782d991099490f80205d65bf" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "93b29a32d5f4be10e39226c6b796f28d68a8b483" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "93b29a32d5f4be10e39226c6b796f28d68a8b483" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||||
|
|
|
||||||
|
|
@ -1,43 +1,22 @@
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
return {
|
return {
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
-- See `:help gitsigns.txt`
|
-- See `:help gitsigns.txt`
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = "+" },
|
add = { text = "+" },
|
||||||
change = { text = "~" },
|
change = { text = "~" },
|
||||||
delete = { text = "_" },
|
delete = { text = "_" },
|
||||||
topdelete = { text = "‾" },
|
topdelete = { text = "‾" },
|
||||||
changedelete = { text = "~" },
|
changedelete = { text = "~" },
|
||||||
},
|
},
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
--vim.keymap.set(
|
vim.keymap.set(
|
||||||
-- "n",
|
"n",
|
||||||
-- "<leader>ggh",
|
"<leader>gg",
|
||||||
-- require("gitsigns").preview_hunk,
|
require("gitsigns").preview_hunk,
|
||||||
-- { buffer = bufnr, desc = "Preview git hunk" }
|
{ buffer = bufnr, desc = "Preview git hunk" }
|
||||||
--)
|
)
|
||||||
|
end,
|
||||||
-- don't override the built-in and fugitive keymaps
|
},
|
||||||
local gs = package.loaded.gitsigns
|
|
||||||
vim.keymap.set({ "n", "v" }, "]c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "]c"
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
|
||||||
gs.next_hunk()
|
|
||||||
end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
|
||||||
vim.keymap.set({ "n", "v" }, "[c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "[c"
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
|
||||||
gs.prev_hunk()
|
|
||||||
end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue