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
+24 -20
View File
@@ -13,23 +13,27 @@
-- https://github.com/stevearc/aerial.nvim
require("aerial").setup({
layout = {
min_width = 40,
placement = "edge",
},
disable_max_size = 10000000,
highlight_on_hover = true,
ignore = {
unlisted_buffers = true,
},
on_attach = function (bufnr)
vim.keymap.set(
"n",
"<leader>at",
function () vim.cmd.AerialToggle({ bang = true, }) end,
{ buffer = bufnr, }
)
end,
show_guides = true,
})
local function setup()
require("aerial").setup({
layout = {
min_width = 40,
placement = "edge",
},
disable_max_size = 10000000,
highlight_on_hover = true,
ignore = {
unlisted_buffers = true,
},
on_attach = function (bufnr)
vim.keymap.set(
"n",
"<leader>at",
function () vim.cmd.AerialToggle({ bang = true, }) end,
{ buffer = bufnr, }
)
end,
show_guides = true,
})
end
return setup