Skip to content

Commit 6f1cf00

Browse files
author
jghauser
committed
fix: make some notify into log
1 parent e5f08b1 commit 6f1cf00

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

lua/papis/completion/init.lua

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ local log = require("papis.log")
99

1010
local has_cmp, cmp = pcall(require, "cmp")
1111
if not has_cmp then
12-
vim.notify("The plugin nvim-cmp wasn't found but the respective papis.nvim module is configured to be loaded.",
13-
vim.log.levels.ERROR)
12+
log.error("The plugin nvim-cmp wasn't found but the respective papis.nvim module is configured to be loaded.")
1413
return nil
1514
end
1615

lua/papis/init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function M.start()
6363
-- set up db
6464
local db = require("papis.sqlite-wrapper")
6565
if not db then
66-
vim.notify("Requiring `sqlite-wrapper.lua` failed. Aborting...", vim.log.levels.ERROR)
66+
log.error("Requiring `sqlite-wrapper.lua` failed. Aborting...")
6767
return nil
6868
end
6969
db:init()
@@ -76,7 +76,7 @@ function M.start()
7676
-- require what's necessary within `M.start()` instead of globally to allow lazy-loading
7777
local data = require("papis.data")
7878
if not data then
79-
vim.notify("Requiring `data.lua` failed. Aborting...", vim.log.levels.ERROR)
79+
log.error("Requiring `data.lua` failed. Aborting...")
8080
return nil
8181
end
8282

lua/papis/search/init.lua

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
local log = require("papis.log")
88
local has_telescope, telescope = pcall(require, "telescope")
99
if not has_telescope then
10-
vim.notify("The plugin telescope.nvim wasn't found but the search module is enabled and requires it.",
11-
vim.log.levels.ERROR)
10+
log.error("The plugin telescope.nvim wasn't found but the search module is enabled and requires it.")
1211
return nil
1312
end
1413
local entry_display = require("telescope.pickers.entry_display")

lua/papis/sqlite-wrapper.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
-- Wrapper around sqlite.lua setting up the main database and associated methods.
66
--
77

8+
local log = require("papis.log")
9+
810
local has_sqlite, sqlite = pcall(require, "sqlite")
911
if not has_sqlite then
10-
vim.notify("The dependency 'sqlite.nvim' is missing. Ensure that it is installed to run papis.nvim",
11-
vim.log.levels.ERROR)
12+
log.error("The dependency 'sqlite.nvim' is missing. Ensure that it is installed to run papis.nvim")
1213
return nil
1314
end
1415
local sqlite_utils = require "sqlite.utils"

lua/papis/utils.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ end
133133
function M:do_open_text_file(papis_id, type)
134134
local db = require("papis.sqlite-wrapper")
135135
if not db then
136-
vim.notify("Sqlite-wrapper has not been initialised properly. Aborting...", vim.log.levels.ERROR)
136+
log.error("Sqlite-wrapper has not been initialised properly. Aborting...")
137137
return nil
138138
end
139139
log.debug("Opening a text file")

0 commit comments

Comments
 (0)