diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua index 67c93bf..162c754 100644 --- a/after/plugin/lualine.lua +++ b/after/plugin/lualine.lua @@ -15,3 +15,20 @@ -- section_separators = '', -- }, -- } +local theme = require("lualine.themes.rose-pine") +local modes = { "normal", "insert", "visual", "replace", "command", "inactive" } +for _, mode in ipairs(modes) do + theme[mode].c.bg = "none" +end + + +-- Set lualine as statusline +-- See `:help lualine.txt` +require('lualine').setup { + options = { + icons_enabled = false, + theme = theme, + component_separators = '|', + section_separators = '', + }, +} diff --git a/after/plugin/rose-pine.lua b/after/plugin/rose-pine.lua index 843b85d..2788725 100644 --- a/after/plugin/rose-pine.lua +++ b/after/plugin/rose-pine.lua @@ -1,12 +1,10 @@ --- require('rose-pine').setup({ --- groups = { --- background = 'none' --- }, --- highlight_groups = { --- MsgArea = { bg = 'none' }, --- } --- }) --- --- vim.cmd('colorscheme rose-pine') --- --- +require('rose-pine').setup({ + groups = { + background = 'none' + }, + highlight_groups = { + MsgArea = { bg = 'none' }, + } +}) + +vim.cmd('colorscheme rose-pine') diff --git a/lua/zynh/packer.lua b/lua/zynh/packer.lua index c860095..da4f5e6 100644 --- a/lua/zynh/packer.lua +++ b/lua/zynh/packer.lua @@ -19,18 +19,6 @@ return require('packer').startup(function(use) use { 'rose-pine/neovim', as = 'rose-pine', - config = function() - require('rose-pine').setup({ - groups = { - background = 'none' - }, - highlight_groups = { - MsgArea = { bg = 'none' }, - } - }) - - vim.cmd('colorscheme rose-pine') - end } use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) @@ -49,25 +37,6 @@ return require('packer').startup(function(use) use { 'nvim-lualine/lualine.nvim', after = 'rose-pine', - config = function() - local theme = require("lualine.themes.rose-pine") - local modes = { "normal", "insert", "visual", "replace", "command", "inactive" } - for _, mode in ipairs(modes) do - theme[mode].c.bg = "none" - end - - - -- Set lualine as statusline - -- See `:help lualine.txt` - require('lualine').setup { - options = { - icons_enabled = false, - theme = 'rose-pine', - component_separators = '|', - section_separators = '', - }, - } - end } -- Fancier statusline use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index 20ca3f7..0f4210d 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -130,8 +130,10 @@ _G.packer_plugins = { url = "https://github.com/VonHeikemen/lsp-zero.nvim" }, ["lualine.nvim"] = { + load_after = {}, loaded = true, - path = "/Users/zynh/.local/share/nvim/site/pack/packer/start/lualine.nvim", + needs_bufread = false, + path = "/Users/zynh/.local/share/nvim/site/pack/packer/opt/lualine.nvim", url = "https://github.com/nvim-lualine/lualine.nvim" }, ["mason-lspconfig.nvim"] = { @@ -229,6 +231,11 @@ time([[Config for which-key.nvim]], false) time([[Conditional loading of telescope-fzf-native.nvim]], true) require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins) time([[Conditional loading of telescope-fzf-native.nvim]], false) +-- Load plugins in order defined by `after` +time([[Sequenced loading]], true) +vim.cmd [[ packadd rose-pine ]] +vim.cmd [[ packadd lualine.nvim ]] +time([[Sequenced loading]], false) _G._packer.inside_compile = false if _G._packer.needs_bufread == true then