docs/refactor: add AI disclosure and clean up code style
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user