Icons: allow setting a string as file icon

Closes https://github.com/kyazdani42/nvim-tree.lua/issues/45
This commit is contained in:
Santos Gallegos
2020-08-02 11:40:51 -05:00
parent 464ce21feb
commit a2e0db6123
2 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ if icon_state.show_folder_icon then
end
end
local get_file_icon = function() return "" end
local get_file_icon = function() return icon_state.icons.default end
if icon_state.show_file_icon then
local web_devicons = require'nvim-web-devicons'
@@ -158,7 +158,7 @@ local function update_draw_data(tree, depth, markers)
local icon
local git_icons
if special[node.name] then
icon = ""
icon = icon_state.icons.default
git_icons = get_git_icons(node, index, offset, 0)
table.insert(hl, {'LuaTreeSpecialFile', index, offset+#git_icons, -1})
else