From 25060f1713feba3c79514683a8b6456067eee39d Mon Sep 17 00:00:00 2001 From: Matt Leong Date: Fri, 29 Oct 2021 16:44:02 -0700 Subject: [PATCH] feat(file-explorer): remove broken icon on nvim tree statusline --- lua/cosmic/core/statusline/init.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lua/cosmic/core/statusline/init.lua b/lua/cosmic/core/statusline/init.lua index 4bddb34..87f1a74 100644 --- a/lua/cosmic/core/statusline/init.lua +++ b/lua/cosmic/core/statusline/init.lua @@ -415,7 +415,9 @@ gls.short_line_left = { end, 'FileIcon', }, - condition = condition.buffer_not_empty, + condition = function() + return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree' + end, highlight = { require('galaxyline.providers.fileinfo').get_file_icon, colors.bg, @@ -425,14 +427,18 @@ gls.short_line_left = { { FilePathShort = { provider = FilePathShortProvider, - condition = condition.buffer_not_empty, + condition = function() + return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree' + end, highlight = { colors.white, colors.bg }, }, }, { FileNameShort = { provider = 'FileName', - condition = condition.buffer_not_empty, + condition = function() + return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree' + end, highlight = { colors.white, colors.bg }, }, },