Skip to content

Commit

Permalink
feat(config): add info msg when Papis config import without changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jghauser committed Jun 4, 2024
1 parent 77f1ca0 commit 0001954
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/papis/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ function M:compare_papis_py_conf(papis_py_conf_new)
local papis_py_conf_old = db.config:get()[1]
papis_py_conf_old["id"] = nil

local log = require("papis.log")
if not vim.deep_equal(papis_py_conf_new, papis_py_conf_old) then
db.config:drop()
db.config:update({ id = 1 }, papis_py_conf_new)
local log = require("papis.log")
log.info("Configuration has changed. Please close all instances of neovim and run `:PapisReInitData`")
else
log.info("Configuration hasn't changed. No action required.")
end
end

Expand Down

0 comments on commit 0001954

Please sign in to comment.