Fix call some methods more safely

This commit is contained in:
2023-09-19 15:56:39 +02:00
parent e58c281617
commit 41bcb60bdc
5 changed files with 112 additions and 33 deletions
+9 -5
View File
@@ -16,15 +16,19 @@
-- https://github.com/rcarriga/nvim-notify
local telescope = require("telescope")
local has_telescope, telescope = pcall(require, "telescope")
local notify = require("notify")
notify.setup({
render = "default",
stages = "fade",
})
vim.notify = notify
telescope.load_extension("notify")
vim.keymap.set(
"n", "<leader>fn", function () telescope.extensions.notify.notify() end
)
if has_telescope then
telescope.load_extension("notify")
vim.keymap.set(
"n", "<leader>fn", function () telescope.extensions.notify.notify() end
)
end