docs/refactor: add AI disclosure and clean up code style

This commit is contained in:
2026-04-18 00:00:45 +02:00
parent 4f2ce0349c
commit 56ccfe63b6
5 changed files with 50 additions and 31 deletions

View File

@@ -4,7 +4,7 @@
local M = {}
local config = require("jasper.config")
local timer = require("jasper.timer")
local timer = require("jasper.timer")
--- Setup the plugin.
---
@@ -36,19 +36,14 @@ function M.setup(opts)
end
if not project_cfg.attivita_id then
vim.notify(
"[Jasper] .jasper_config.json found but 'attivita_id' is missing",
vim.log.levels.WARN
)
vim.notify("[Jasper] .jasper_config.json found but 'attivita_id' is missing", vim.log.levels.WARN)
return
end
-- Merge: project file values < global setup() opts (global opts take priority)
local effective_opts = {
attivita_id = project_cfg.attivita_id,
inactivity_timeout = opts.inactivity_timeout
or project_cfg.inactivity_timeout
or 10,
inactivity_timeout = opts.inactivity_timeout or project_cfg.inactivity_timeout or 10,
}
timer.setup(effective_opts)