mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-12 06:08:29 +00:00
feat(editor): Add auto_insert option for commit/describe buffers (#88)
This commit is contained in:
+8
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user