Make all plugin configs return a function

Simplifies writing the `config = ...` field for each plugin
This commit is contained in:
2023-09-25 16:08:06 +02:00
parent 7739ec5591
commit ac35b77c87
33 changed files with 747 additions and 618 deletions
+14 -10
View File
@@ -16,17 +16,21 @@
-- https://github.com/rcarriga/nvim-notify
local has_telescope, telescope = pcall(require, "telescope")
local function setup()
local has_telescope, telescope = pcall(require, "telescope")
local notify = require("notify")
notify.setup({
render = "default",
stages = "static",
})
local notify = require("notify")
notify.setup({
render = "default",
stages = "static",
})
vim.notify = notify
vim.notify = notify
if has_telescope then
telescope.load_extension("notify")
vim.keymap.set("n", "<leader>fn", telescope.extensions.notify.notify)
if has_telescope then
telescope.load_extension("notify")
vim.keymap.set("n", "<leader>fn", telescope.extensions.notify.notify)
end
end
return setup