Skip to content

BREAKING: Delta Pager + Large Refactor #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Aug 27, 2023
Merged

Conversation

harrisoncramer
Copy link
Owner

This MR gives a major overhaul to the plugin to solve issue #25 and to enable commenting consistently.

It does this by introducing the delta pager that enables in-line, unified diff views with line numbers in a "review" panel just like Gitlab uses. For instance:

Screenshot 2023-08-20 at 3 47 03 PM

As part of this MR I'm reconfiguring the setup function. This is a breaking change. The new setup function call expects a table in this shape (all settings are fully optional):

require("gitlab").setup({
  port = 21036,
  log_path = (vim.fn.stdpath("cache") .. "/gitlab.nvim.log"),
  popup = {
    exit = "<Esc>",
    perform_action = "<leader>s",
  },
  discussion_tree = {
    jump_to_location = "o",
    edit_comment = "e",
    delete_comment = "dd",
    reply_to_comment = "r",
    toggle_node = "t",
    toggle_resolved = "p",
    relative = "editor",
    position = "left",
    size = "20%",
    resolved = '',
    unresolved = ''
  },
  review_pane = {
    toggle_discussions = "<leader>d",
    added_file = "",
    modified_file = "",
    removed_file = "",
  },
  dialogue = {
    focus_next = { "j", "<Down>", "<Tab>" },
    focus_prev = { "k", "<Up>", "<S-Tab>" },
    close = { "<Esc>", "<C-c>" },
    submit = { "<CR>", "<Space>" },
  })

Fixes #25

@harrisoncramer harrisoncramer merged commit 19468a3 into main Aug 27, 2023
@levouh
Copy link

levouh commented Aug 29, 2023

Just dropping a comment to say this is awesome, thanks for all the work @harrisoncramer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leaving Comments Does Not Work
3 participants