-
-
Notifications
You must be signed in to change notification settings - Fork 309
Expand file tree
/
Copy pathinit.lua
More file actions
66 lines (65 loc) · 1.55 KB
/
init.lua
File metadata and controls
66 lines (65 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
return {
"isakbm/gitgraph.nvim",
lazy = true,
opts = function(_, opts)
if vim.env.KITTY_PID ~= nil then
opts.symbols = {
merge_commit = "",
commit = "",
merge_commit_end = "",
commit_end = "",
-- Advanced symbols
GVER = "",
GHOR = "",
GCLD = "",
GCRD = "╭",
GCLU = "",
GCRU = "",
GLRU = "",
GLRD = "",
GLUD = "",
GRUD = "",
GFORKU = "",
GFORKD = "",
GRUDCD = "",
GRUDCU = "",
GLUDCD = "",
GLUDCU = "",
GLRDCL = "",
GLRDCR = "",
GLRUCL = "",
GLRUCR = "",
}
end
end,
specs = {
{ -- mapping to open GitGraph
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["<Leader>g|"] = {
function() require("gitgraph").draw({}, { all = true, max_count = 5000 }) end,
desc = "GitGraph",
},
},
},
},
},
{ -- use diffview for viewing commits if available
"sindrets/diffview.nvim",
optional = true,
specs = {
{
"isakbm/gitgraph.nvim",
opts = {
hooks = {
on_select_commit = function(commit) vim.cmd.DiffviewOpen(commit.hash .. "^!") end,
on_select_range_commit = function(from, to) vim.cmd.DiffviewOpen(from.hash .. "~1.." .. to.hash) end,
},
},
},
},
},
},
}