Make all plugin configs return a function
Simplifies writing the `config = ...` field for each plugin
This commit is contained in:
+31
-27
@@ -16,32 +16,36 @@
|
||||
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "", },
|
||||
section_separators = { left = "", right = "", },
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
"mode",
|
||||
{ "filename", path = 1, },
|
||||
"diff",
|
||||
{ "diagnostics", sources = { "nvim_lsp", }, },
|
||||
local function setup()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "", },
|
||||
section_separators = { left = "", right = "", },
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
lualine_x = {
|
||||
"bo:filetype",
|
||||
"encoding",
|
||||
"bo:fileformat",
|
||||
"progress",
|
||||
"location",
|
||||
sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
"mode",
|
||||
{ "filename", path = 1, },
|
||||
"diff",
|
||||
{ "diagnostics", sources = { "nvim_lsp", }, },
|
||||
},
|
||||
lualine_x = {
|
||||
"bo:filetype",
|
||||
"encoding",
|
||||
"bo:fileformat",
|
||||
"progress",
|
||||
"location",
|
||||
},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
Reference in New Issue
Block a user