mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-05 18:56:13 +00:00
- Document describe.editor configuration for type and keymaps - Document keymaps configuration for log, status, and close keybindings - Update examples to show the new nested config structure - Add section on customizing describe editor keymaps - Preserve multiline descriptions in describe editor buffer
35 lines
941 B
Lua
35 lines
941 B
Lua
local M = {}
|
|
local cmd = require("jj.cmd")
|
|
local picker = require("jj.picker")
|
|
local editor = require("jj.ui.editor")
|
|
|
|
--- Jujutsu plugin configuration
|
|
--- @class jj.Config
|
|
--- @field cmd? jj.cmd.opts Options for command module
|
|
--- @field picker? jj.picker.config Options for picker module
|
|
--- @field highlights? jj.ui.editor.highlights Highlight configuration for describe buffer
|
|
M.config = {
|
|
-- Default configuration
|
|
--- @type jj.picker.config
|
|
picker = {
|
|
snacks = {},
|
|
},
|
|
--- @type jj.ui.editor.highlights Highlight configuration for describe buffer
|
|
highlights = {},
|
|
}
|
|
|
|
--- Setup the plugin
|
|
--- @param opts jj.Config: Options to configure the plugin
|
|
function M.setup(opts)
|
|
M.config = vim.tbl_deep_extend("force", M.config, opts or {})
|
|
|
|
-- Setup for sub-modules
|
|
picker.setup(opts and opts.picker or {})
|
|
editor.setup({ highlights = M.config.highlights })
|
|
cmd.setup(opts and opts.cmd or {})
|
|
|
|
cmd.register_command()
|
|
end
|
|
|
|
return M
|