Closed lalitmee closed 3 years ago
This works:
Put this in your vimrc:
lua << EOF
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
EOF
function! StartifyEntryFormat() abort
return 'v:lua.webDevIcons(absolute_path) . " " . entry_path'
endfunction
Or pure Lua: --> Startify/init.lua
@Mathijs-Bakker , thanks for your solution. I got the same answer from a recent Reddit post. I solved it.
Thank you so much. :+1:
How can I show devicons using nvim-web-devicons? I am trying to use plugins which are written in lua so I am trying to loose vim-devicons.
I am trying to use something like this. I don't know how to write
viml
orlua
.Am I doing something wrong?