Make all plugin configs return a function
Simplifies writing the `config = ...` field for each plugin
This commit is contained in:
+14
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user