refactor: config.lua -> defaults.lua

This commit is contained in:
hoob3rt 2021-03-18 02:13:40 +01:00
parent bfc9c744d7
commit 21ea1acc61
2 changed files with 6 additions and 14 deletions

View File

@ -3,7 +3,7 @@
local utils = require('lualine.utils.utils') local utils = require('lualine.utils.utils')
local utils_section = require('lualine.utils.section') local utils_section = require('lualine.utils.section')
local highlight = require('lualine.highlight') local highlight = require('lualine.highlight')
local config = require('lualine.config') local config = require('lualine.defaults')
local M = {} local M = {}
@ -339,21 +339,13 @@ function M.setup(user_config)
print( print(
'lualine.nvim: lualine is moving to setup function to be consistent with other lua plugins, all other configuration options will be removed by 24.03.2021, please change your configuration(example in readme)') 'lualine.nvim: lualine is moving to setup function to be consistent with other lua plugins, all other configuration options will be removed by 24.03.2021, please change your configuration(example in readme)')
end end
if M.options ~=nil then if M.options ~= nil then user_config.options = M.options end
user_config.options = M.options if M.sections ~= nil then user_config.sections = M.sections end
end
if M.sections ~=nil then
user_config.sections = M.sections
end
if M.inactive_sections ~= nil then if M.inactive_sections ~= nil then
user_config.inactive_sections = M.inactive_sections user_config.inactive_sections = M.inactive_sections
end end
if M.tabline ~=nil then if M.tabline ~= nil then user_config.tabline = M.tabline end
user_config.tabline = M.tabline if M.extensions ~= nil then user_config.extensions = M.extensions end
end
if M.extensions ~=nil then
user_config.extensions = M.extensions
end
end end
apply_configuration(vim.g.lualine) apply_configuration(vim.g.lualine)
apply_configuration(user_config) apply_configuration(user_config)