feat: add hl_group for file icons (#1131)
This commit is contained in:
@@ -801,6 +801,7 @@ NvimTreeSymlink
|
|||||||
NvimTreeFolderName
|
NvimTreeFolderName
|
||||||
NvimTreeRootFolder
|
NvimTreeRootFolder
|
||||||
NvimTreeFolderIcon
|
NvimTreeFolderIcon
|
||||||
|
NvimTreeFileIcon
|
||||||
NvimTreeEmptyFolderName
|
NvimTreeEmptyFolderName
|
||||||
NvimTreeOpenedFolderName
|
NvimTreeOpenedFolderName
|
||||||
NvimTreeExecFile
|
NvimTreeExecFile
|
||||||
|
|||||||
@@ -83,8 +83,13 @@ if icon_state.show_file_icon then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
get_file_icon = function()
|
get_file_icon = function(_, _, line, depth)
|
||||||
return #icon_state.icons.default > 0 and icon_state.icons.default .. icon_padding or ""
|
local hl_group = "NvimTreeFileIcon"
|
||||||
|
local icon = icon_state.icons.default
|
||||||
|
if #icon > 0 then
|
||||||
|
table.insert(hl, { hl_group, line, depth, depth + #icon + 1 })
|
||||||
|
end
|
||||||
|
return #icon > 0 and icon .. icon_padding or ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user