Skip to content

Commit c73f255

Browse files
author
jghauser
committed
feat(init): better logging
1 parent 6cacc32 commit c73f255

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lua/papis/init.lua

+5-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ function M.start()
8181
end
8282

8383
-- setup commands
84+
log.debug("Setting up commands")
8485
require("papis.commands").setup()
8586

8687
-- setup enabled modules
8788
for module_name, _ in pairs(config.enable_modules) do
88-
log.trace(module_name .. " is enabled")
89+
log.debug(module_name .. " is enabled")
8990
local has_module, module = pcall(require, "papis." .. module_name)
9091
if has_module then
9192
if module.setup then
@@ -95,20 +96,22 @@ function M.start()
9596
end
9697

9798
-- setup keymaps
99+
log.debug("Setting up keymaps")
98100
require("papis.keymaps"):setup()
99101

100102
-- check if other neovim instances has file watchers
101103
local does_pid_exist = require("papis.utils").does_pid_exist
102104
if not does_pid_exist(db.state:get_fw_running()) then
103105
-- setup file watchers because no other neovim instance has them
104106
if config.enable_fs_watcher then
107+
log.debug("Setting up file watchers")
105108
require("papis.fs-watcher"):init()
106109
end
107110

108111
-- only synchronise the data table if it's not empty
109112
-- (in that case, we tell users to manually do it because it takes a while)
110113
if not db.data:empty() then
111-
log.debug("Synchronising the database")
114+
log.debug("Setting up/syncrhonising the database")
112115
data:sync_db()
113116
end
114117
else

0 commit comments

Comments
 (0)