From 116cbe79befa0e7e8b8469b2675b3242418c4cbd Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 15:11:14 +0100 Subject: [PATCH] nvim: Refactor lualine configuration Configure in its lazy loading file to not have an extra file flying around. --- .../nvim/lua/plugins/config/lualine.lua | 28 ---------------- nvim/.config/nvim/lua/plugins/ui.lua | 33 ++++++++++++++++--- 2 files changed, 29 insertions(+), 32 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plugins/config/lualine.lua diff --git a/nvim/.config/nvim/lua/plugins/config/lualine.lua b/nvim/.config/nvim/lua/plugins/config/lualine.lua deleted file mode 100644 index e978425..0000000 --- a/nvim/.config/nvim/lua/plugins/config/lualine.lua +++ /dev/null @@ -1,28 +0,0 @@ -require("lualine").setup({ - options = { - icons_enabled = true, - theme = "auto", - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = {}, - always_divide_middle = true, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { "filename" }, - lualine_x = { "encoding", "fileformat", "filetype" }, - lualine_y = { "progress", "location" }, - lualine_z = { "hostname" }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = { "branch", "diff" }, - lualine_c = { "filename" }, - lualine_x = {}, - lualine_y = { "location" }, - lualine_z = {}, - }, - tabline = {}, - extensions = { "quickfix", "toggleterm" }, -}) diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index 4130eb6..e9b3477 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -3,10 +3,35 @@ return { { "nvim-lualine/lualine.nvim", requires = { "nvim-tree/nvim-web-devicons", config = true }, - config = function() - require("plugins.config.lualine") - end, - event = "VeryLazy", + opts = { + options = { + icons_enabled = true, + theme = "auto", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = {}, + always_divide_middle = true, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { "filename" }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress", "location" }, + lualine_z = { "hostname" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = { "branch", "diff" }, + lualine_c = { "filename" }, + lualine_x = {}, + lualine_y = { "location" }, + lualine_z = {}, + }, + tabline = {}, + extensions = { "quickfix", "toggleterm" }, + }, + event = { "BufNewFile", "BufAdd", "BufWinEnter" }, }, -- create pretty unobtrusive notifications {