Add configurable folder icons
This commit is contained in:
@@ -63,6 +63,10 @@ let g:lua_tree_icons = {
|
|||||||
\ 'unmerged': "═",
|
\ 'unmerged': "═",
|
||||||
\ 'renamed': "➜",
|
\ 'renamed': "➜",
|
||||||
\ 'untracked': "★"
|
\ 'untracked': "★"
|
||||||
|
\ },
|
||||||
|
\ 'folder': {
|
||||||
|
\ 'default': "",
|
||||||
|
\ 'open': ""
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ function M.get_icon_state()
|
|||||||
unmerged = "═",
|
unmerged = "═",
|
||||||
renamed = "➜",
|
renamed = "➜",
|
||||||
untracked = "★"
|
untracked = "★"
|
||||||
|
},
|
||||||
|
folder_icons = {
|
||||||
|
default = "",
|
||||||
|
open = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +27,11 @@ function M.get_icon_state()
|
|||||||
icons.git_icons[key] = val
|
icons.git_icons[key] = val
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
for key, val in pairs(user_icons.folder) do
|
||||||
|
if icons.folder_icons[key] then
|
||||||
|
icons.folder_icons[key] = val
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ end
|
|||||||
if icon_state.show_folder_icon then
|
if icon_state.show_folder_icon then
|
||||||
get_folder_icon = function(open)
|
get_folder_icon = function(open)
|
||||||
if open then
|
if open then
|
||||||
return " "
|
return icon_state.icons.folder_icons.open .. " "
|
||||||
else
|
else
|
||||||
return " "
|
return icon_state.icons.folder_icons.default .. " "
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
set_folder_hl = function(index, depth, icon_len, name_len)
|
set_folder_hl = function(index, depth, icon_len, name_len)
|
||||||
|
|||||||
Reference in New Issue
Block a user