mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-05 10:46:08 +00:00
feat: Rebase on log buffer (#62)
Now it is possible to rebase interactively from the log buffer with visual feedback. You can rebase one or many visually selected changes. Supported target modes are: `-o` / `-A` / `-B`. Limitation: - As of now you cannot rebase a whole branch (-b) from the log view. Bonus from this pr: - Now keymaps support different modes
This commit is contained in:
+16
-6
@@ -9,16 +9,26 @@ local terminal = require("jj.ui.terminal")
|
||||
--- @field cmd? jj.cmd.opts Options for command module
|
||||
--- @field picker? jj.picker.config Options for picker module
|
||||
--- @field terminal? jj.ui.terminal.opts Options for the terminal
|
||||
--- @field highlights? jj.ui.editor.highlights Highlight configuration for describe buffer
|
||||
--- @field highlights? jj.highlights Options for the highlights
|
||||
|
||||
--- @class jj.highlights
|
||||
--- @field editor? jj.ui.editor.highlights Highlight configuration for describe buffer
|
||||
--- @field log? jj.cmd.log.highlights Highlight configuration for the log buffer
|
||||
|
||||
---@type jj.Config
|
||||
M.config = {
|
||||
-- Default configuration
|
||||
--- @type jj.picker.config
|
||||
picker = {
|
||||
snacks = {},
|
||||
},
|
||||
--- @type jj.ui.editor.highlights Highlight configuration for describe buffer
|
||||
highlights = {},
|
||||
highlights = {
|
||||
editor = {
|
||||
renamed = { fg = "#d29922", ctermfg = "Yellow" },
|
||||
},
|
||||
log = {
|
||||
selected = { bg = "#3d2c52", ctermbg = "DarkMagenta" },
|
||||
targeted = { fg = "#5a9e6f", ctermfg = "Green" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Setup the plugin
|
||||
@@ -28,7 +38,7 @@ function M.setup(opts)
|
||||
|
||||
-- Setup for sub-modules
|
||||
picker.setup(opts and opts.picker or {})
|
||||
editor.setup({ highlights = M.config.highlights })
|
||||
editor.setup({ highlights = M.config.highlights.editor })
|
||||
cmd.setup(opts and opts.cmd or {})
|
||||
terminal.setup(opts and opts.terminal or {})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user