add no buffer icon to statusline

This commit is contained in:
siduck76 2021-08-19 18:13:58 +05:30
parent a49f62d3c6
commit 47ab9c28a1
1 changed files with 5 additions and 1 deletions

View File

@ -99,9 +99,13 @@ gls.left[5] = {
FileName = { FileName = {
provider = function() provider = function()
local fileinfo = require "galaxyline.provider_fileinfo" local fileinfo = require "galaxyline.provider_fileinfo"
if vim.api.nvim_buf_get_name(0):len() == 0 then
return ""
end
return fileinfo.get_current_file_name("", "") return fileinfo.get_current_file_name("", "")
end, end,
condition = condition.buffer_not_empty,
highlight = { colors.white, colors.lightbg }, highlight = { colors.white, colors.lightbg },
separator = right_separator, separator = right_separator,
separator_highlight = { colors.lightbg, colors.lightbg2 }, separator_highlight = { colors.lightbg, colors.lightbg2 },