Closed bryant-the-coder closed 2 years ago
filetype
component already supports icons by default .
You need to install nvim-web-devicons for that to work.
If you want just the icon you can use icon_only option
I mean beside filename...
I mean beside filename...
No filename component doesn't have icons out of the box . But you can create a custom filename component with that functionality .
like how?
like how?
You can just reuse the apply_icon
method from filetype component in your custom filename component to easily get icons with filename.
For example
local my_filename = require('lualine.components.filename'):extend()
my_filename.apply_icon = require('lualine.components.filetype').apply_icon
require'lualine'.setup {
lualine_c = {{my_filename, colored = true}},
}
thanks
You also need to set my_filename.icon_hl_cache = {}
or remove colored = true
from options.
Is it possible to add like when i open a lua file... then there will be a lua icon. Html file with html icon. Is it possible?