BREAKING CHANGE: This is a breaking change, it deprecates the Delta Reviewer (#81)

BREAKING

This is a breaking change which deprecates support for the Delta reviewer. Now, only Diffview is supported.
This commit is contained in:
Harrison (Harry) Cramer
2023-11-10 17:38:28 -05:00
committed by GitHub
parent a032c6434e
commit ffdaf83784
16 changed files with 127 additions and 431 deletions

View File

@@ -11,7 +11,7 @@ M.settings = {
port = nil, -- choose random port
debug = { go_request = false, go_response = false },
log_path = (vim.fn.stdpath("cache") .. "/gitlab.nvim.log"),
reviewer = "delta",
reviewer = "diffview",
attachment_dir = "",
popup = {
exit = "<Esc>",
@@ -33,13 +33,6 @@ M.settings = {
resolved = "",
unresolved = "",
},
review_pane = {
delta = {
added_file = "",
modified_file = "",
removed_file = "",
},
},
pipeline = {
created = "",
pending = "",
@@ -51,12 +44,6 @@ M.settings = {
success = "",
failed = "",
},
dialogue = {
focus_next = { "j", "<Down>", "<Tab>" },
focus_prev = { "k", "<Up>", "<S-Tab>" },
close = { "<Esc>", "<C-c>" },
submit = { "<CR>", "<Space>" },
},
go_server_running = false,
is_gitlab_project = false,
colors = {
@@ -70,10 +57,35 @@ M.settings = {
-- Merges user settings into the default settings, overriding them
M.merge_settings = function(args)
if args == nil then
return
end
M.settings = u.merge(M.settings, args)
-- Check deprecated settings and alert users!
if M.settings.dialogue ~= nil then
u.notify("The dialogue field has been deprecated, please remove it from your setup function", vim.log.levels.WARN)
end
if M.settings.reviewer == "delta" then
u.notify(
"Delta is no longer a supported reviewer, please use diffview and update your setup function",
vim.log.levels.ERROR
)
return false
end
local diffview_ok, _ = pcall(require, "diffview")
if not diffview_ok then
u.notify("Please install diffview, it is required")
return false
end
if M.settings.review_pane ~= nil then
u.notify(
"The review_pane field is only relevant for Delta, which has been deprecated, please remove it from your setup function",
vim.log.levels.WARN
)
end
return true
end
M.print_settings = function()