tamton-aquib / staline.nvim

A modern lightweight statusline and bufferline plugin for neovim in lua.
MIT License
380 stars 17 forks source link

Add 'file_type' and 'file_encoding' in section #66

Closed Jaehaks closed 6 months ago

Jaehaks commented 6 months ago

Hello.

Could you support 'file_type' and 'file_encoding' in section?

tamton-aquib commented 6 months ago

Heyyo @Jaehaks, Just saw the issue #65 opened.

Have you checked out the wiki examples? https://github.com/tamton-aquib/staline.nvim/wiki/Examples

There are examples for vim.bo.fileencoding and vim.bo.filetype.

Jaehaks commented 6 months ago

@tamton-aquib I didn't check the tips. Thank you

Jaehaks commented 6 months ago

@tamton-aquib I checked the tips and inserted config like below image

But the fileencoding don't display image

What I missed?

tamton-aquib commented 6 months ago

@Jaehaks ,

Try wrapping it inside a function:

right = {
    -- ...
    function() return vim.bo.filetype:upper() end
    -- ...
}
Jaehaks commented 6 months ago

@tamton-aquib It works! Thank you