From d61284f62f025b1bcf48ee87bf097194e4f55369 Mon Sep 17 00:00:00 2001 From: Taken Date: Tue, 24 Sep 2024 22:35:12 +0200 Subject: [PATCH] Moved filename from lualine to incline --- lua/taken/plugins/incline.lua | 7 ++++++- lua/taken/plugins/lualine.lua | 11 ++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lua/taken/plugins/incline.lua b/lua/taken/plugins/incline.lua index 623082a..3d38de8 100644 --- a/lua/taken/plugins/incline.lua +++ b/lua/taken/plugins/incline.lua @@ -3,7 +3,6 @@ return { event = "VeryLazy", config = function() local incline = require("incline") - local devicons = require("nvim-web-devicons") incline.setup({ highlight = { @@ -19,11 +18,14 @@ return { }, }, render = function(props) + local devicons = require("nvim-web-devicons") + local helpers = require("incline.helpers") local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") if filename == "" then filename = "[No Name]" end local ft_icon, ft_color = devicons.get_icon_color(filename) + local modified = vim.bo[props.buf].modified local function get_git_diff() local icons = { removed = "", changed = "", added = "" } @@ -66,6 +68,9 @@ return { return { { get_diagnostic_label() }, { get_git_diff() }, + ft_icon and { " ", ft_icon, " ", guibg = ft_color, guifg = helpers.contrast_color(ft_color) } or "", + " ", + { filename, gui = modified and "bold,italic" or "bold" }, } end, }) diff --git a/lua/taken/plugins/lualine.lua b/lua/taken/plugins/lualine.lua index 3e54c05..73d50d2 100644 --- a/lua/taken/plugins/lualine.lua +++ b/lua/taken/plugins/lualine.lua @@ -86,10 +86,10 @@ return { return { bg = mode_color[vim.fn.mode()], fg = colors.bg } end, } - local filename = { - "filename", - color = { fg = colors.magenta, bg = "None", gui = "bold" }, - } + -- local filename = { + -- "filename", + -- color = { fg = colors.magenta, bg = "None", gui = "bold" }, + -- } local branch = { "branch", icon = "", @@ -283,7 +283,8 @@ return { }, sections = { lualine_a = { mode }, - lualine_b = { filename, branch }, + -- lualine_b = { filename, branch }, + lualine_b = { branch }, -- lualine_c = { diagnostics, sep, harpoon }, lualine_c = { sep, harpoon }, -- lualine_x = { copilot, diff, fileformat, lazy, mason },