From 44a4303cd354f4229fc3b7bb302a6d7b7c387a6f Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Fri, 2 Jun 2023 18:15:33 +0000 Subject: [PATCH] This commit refactors the theme & status line cfg This commit refactors the theme & status line configuration into their own lua files so they can be more readily customized by the user. As kickstart has grown, it's becoming harder and harder to keep up with changes to the main init.lua file if you're maintaining local customizations. We should still encourage users to modify init.lua to suit their needs, but also make it possible to leave it unmodified if that's their choice. --- init.lua | 25 ++++--------------------- lua/kickstart/plugins/statusline.lua | 14 ++++++++++++++ lua/kickstart/plugins/theme.lua | 9 +++++++++ 3 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 lua/kickstart/plugins/statusline.lua create mode 100644 lua/kickstart/plugins/theme.lua diff --git a/init.lua b/init.lua index fb0252cc..5e9e5679 100644 --- a/init.lua +++ b/init.lua @@ -129,28 +129,11 @@ require('lazy').setup({ }, }, - { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', - priority = 1000, - config = function() - vim.cmd.colorscheme 'onedark' - end, - }, + -- Theme related configs go here + require 'kickstart.plugins.theme', - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', - }, - }, - }, + -- Status line related configs go here + require 'kickstart.plugins.statusline', { -- Add indentation guides even on blank lines diff --git a/lua/kickstart/plugins/statusline.lua b/lua/kickstart/plugins/statusline.lua new file mode 100644 index 00000000..cfc8cac7 --- /dev/null +++ b/lua/kickstart/plugins/statusline.lua @@ -0,0 +1,14 @@ +return { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'onedark', + component_separators = '|', + section_separators = '', + }, + }, +} + diff --git a/lua/kickstart/plugins/theme.lua b/lua/kickstart/plugins/theme.lua new file mode 100644 index 00000000..2b4313ea --- /dev/null +++ b/lua/kickstart/plugins/theme.lua @@ -0,0 +1,9 @@ +return { + -- Theme inspired by Atom + 'navarasu/onedark.nvim', + priority = 1000, + config = function() + vim.cmd.colorscheme 'onedark' + end, +} +