feat(editor): Add auto_insert option for commit/describe buffers (#88)

This commit is contained in:
Brad Robinson
2026-03-12 14:22:02 +01:00
committed by GitHub
parent bbba4051c8
commit ec44937e1b
2 changed files with 32 additions and 2 deletions
+8 -1
View File
@@ -11,6 +11,7 @@ local browse = require("jj.browse")
--- @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 editor? jj.ui.editor.opts Options for the editor module
--- @field highlights? jj.highlights Options for the highlights
--- @field diff? jj.diff.config Options for the diff module
@@ -23,6 +24,9 @@ M.config = {
picker = {
snacks = {},
},
editor = {
auto_insert = false,
},
highlights = {
editor = {
renamed = { fg = "#d29922", ctermfg = "Yellow" },
@@ -45,7 +49,10 @@ function M.setup(opts)
-- Setup for sub-modules
picker.setup(opts and opts.picker or {})
editor.setup({ highlights = M.config.highlights.editor })
editor.setup({
highlights = M.config.highlights.editor,
auto_insert = M.config.editor.auto_insert,
})
cmd.setup(opts and opts.cmd or {})
terminal.setup(opts and opts.terminal or {})
diff.setup(M.config.diff)