From 21ea1acc619f95e3a4cf74be9341995ccf03c1ed Mon Sep 17 00:00:00 2001 From: hoob3rt Date: Thu, 18 Mar 2021 02:13:40 +0100 Subject: [PATCH] refactor: config.lua -> defaults.lua --- lua/lualine/{config.lua => defaults.lua} | 0 lua/lualine/init.lua | 20 ++++++-------------- 2 files changed, 6 insertions(+), 14 deletions(-) rename lua/lualine/{config.lua => defaults.lua} (100%) diff --git a/lua/lualine/config.lua b/lua/lualine/defaults.lua similarity index 100% rename from lua/lualine/config.lua rename to lua/lualine/defaults.lua diff --git a/lua/lualine/init.lua b/lua/lualine/init.lua index 6eef05f..93c5036 100644 --- a/lua/lualine/init.lua +++ b/lua/lualine/init.lua @@ -3,7 +3,7 @@ local utils = require('lualine.utils.utils') local utils_section = require('lualine.utils.section') local highlight = require('lualine.highlight') -local config = require('lualine.config') +local config = require('lualine.defaults') local M = {} @@ -339,21 +339,13 @@ function M.setup(user_config) 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)') end - if M.options ~=nil then - user_config.options = M.options - end - if M.sections ~=nil then - user_config.sections = M.sections - end - if M.inactive_sections ~=nil then + if M.options ~= nil then user_config.options = M.options end + if M.sections ~= nil then user_config.sections = M.sections end + if M.inactive_sections ~= nil then user_config.inactive_sections = M.inactive_sections end - if M.tabline ~=nil then - user_config.tabline = M.tabline - end - if M.extensions ~=nil then - user_config.extensions = M.extensions - end + if M.tabline ~= nil then user_config.tabline = M.tabline end + if M.extensions ~= nil then user_config.extensions = M.extensions end end apply_configuration(vim.g.lualine) apply_configuration(user_config)