blob: dc4155a807caad60cb95036770cf465888eae880 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
local utils = require("tobyvin.utils")
local M = {}
M.setup = function()
local status_ok, notify = pcall(require, "notify")
if not status_ok then
vim.notify("Failed to load module 'notify'", vim.log.levels.ERROR)
return
end
notify.setup({
background_colour = "#" .. vim.api.nvim_get_hl_by_name("Pmenu", true).background,
})
vim.notify = notify
local telescope_ok, telescope = pcall(require, "telescope")
if telescope_ok then
telescope.load_extension("notify")
utils.keymap.group("n", "<leader>f", { desc = "find" })
vim.keymap.set("n", "<leader>fn", telescope.extensions.notify.notify, { desc = "notifications" })
end
end
return M
|