Skip to content

Commit 8140e52

Browse files
committed
Add health check for ui.conflict-marker-style
1 parent ad8aac6 commit 8140e52

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lua/jj-diffconflicts/health.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ M.check = function()
1111
vim.health.error("Only Neovim 0.10+ is supported")
1212
end
1313

14+
local marker_style_cmd =
15+
vim.system({ "jj", "config", "get", "ui.conflict-marker-style" }):wait()
16+
if marker_style_cmd.code ~= 0 then
17+
vim.health.error(
18+
"Could not get conflict-marker-style config: " .. marker_style_cmd.stderr
19+
)
20+
else
21+
local marker_style = vim.trim(marker_style_cmd.stdout)
22+
if marker_style ~= "diff" then
23+
vim.health.error("Unsupported ui.conflict-marker-style: " .. marker_style)
24+
else
25+
vim.health.ok("ui.conflict-marker-style: " .. marker_style)
26+
end
27+
end
28+
1429
local ok, version = pcall(require("jj-diffconflicts").get_jj_version)
1530
if not ok then
1631
vim.health.error("Could not get Jujutsu version: " .. version)

0 commit comments

Comments
 (0)