Closed oppara closed 1 year ago
local function is_new_file()
local filename = vim.fn.expand('%')
return filename ~= '' and vim.bo.buftype == '' and vim.fn.filereadable(filename) == 0
end
if self.options.newfile_status and is_new_file() then
table.insert(symbols, self.options.symbols.newfile)
end
lua/lualine/components/filename.lua
local default_options = {
symbols = {
modified = '[+]',
readonly = '[-]',
unnamed = '[No Name]',
newfile = '[New]',
},
file_status = true,
newfile_status = false,
path = 0,
shorting_target = 40,
}
readonly, modified と同じ対応をする