]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/nvim/lua/plugins/jj-conflict.lua
+user/operability(ui): add jj-conflict
[julm/julm-nix.git] / home-manager / profiles / nvim / lua / plugins / jj-conflict.lua
1 -- Neovim plugin for resolving, and visualizing Jujutsu conflicts
2 -- https://github.com/larpios/jj-conflict.nvim
3 return {
4 "jj-conflict.nvim",
5 enabled = true,
6 event = { "BufReadPre", "BufNewFile" },
7 cmd = {
8 "JjConflictChooseBoth",
9 "JjConflictChooseNone",
10 "JjConflictChooseOurs",
11 "JjConflictChooseTheirs",
12 "JjConflictDiff",
13 "JjConflictList",
14 "JjConflictLog",
15 "JjConflictNextConflict",
16 "JjConflictPrevConflict",
17 "JjConflictResolve",
18 "JjConflictSquash",
19 "JjConflictStatus",
20 },
21 load = function(name)
22 vim.cmd.packadd("lualine.nvim")
23 vim.cmd.packadd(name)
24 end,
25 after = function()
26 require("jj-conflict").setup({
27 -- Whether to automatically setup default mappings
28 default_mappings = true,
29 -- Whether to automatically setup default commands
30 default_commands = true,
31 -- Whether to enable notifications (require snacks)
32 notify = true,
33 -- Prefix for keybinding descriptions
34 desc_prefix = nil,
35 highlights = {
36 ours = "DiffAdd",
37 theirs = "DiffText",
38 marker = "CursorLine",
39 label = "Comment",
40 diff_remove = "DiffDelete",
41 diff_add = "DiffAdd",
42 },
43 mappings = {
44 base = "hb",
45 both = "hh",
46 next = "hk",
47 ours = "ho",
48 prev = "hi",
49 theirs = "ht",
50 },
51 })
52 -- In your lualine config:
53 require("lualine").setup({
54 sections = {
55 lualine_c = {
56 {
57 require("jj-conflict.statusline").get_status,
58 cond = function()
59 return require("jj-conflict.api").has_conflicts(0)
60 end,
61 },
62 },
63 },
64 })
65 end,
66 }