-
Hi, function! StartifyEntryFormat()
return 'WebDevIconsGetFileTypeSymbol(absolute_path) ." ". entry_path'
endfunction How can I accomplish the same thing with this plugin? I know that there is return luaeval("require('nvim-web-devicons').get_icon_by_filetype( absolute_path ) .. ' entry_path'") but that doesn't seem to work. I don't want to use |
Beta Was this translation helpful? Give feedback.
Answered by
D00mch
Nov 16, 2022
Replies: 1 comment 7 replies
-
There is an answer on reddit: Web Devicons wrapper in lua: function _G.webDevIcons(path)
local filename = vim.fn.fnamemodify(path, ':t')
local extension = vim.fn.fnamemodify(path, ':e')
return require'nvim-web-devicons'.get_icon(filename, extension, { default = true })
end This is the vim function for startify function! StartifyEntryFormat() abort
return 'v:lua.webDevIcons(absolute_path) . " " . entry_path'
endfunction |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
gegoune
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an answer on reddit:
Web Devicons wrapper in lua:
This is the vim function for startify