Files
jj.nvim/lua/jj/init.lua
T
NicolasGB be925a9882 Update README with new config structure
- 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
2025-11-23 16:34:42 +01:00

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