From 736c7ff59065275f0483af4b7f07a9bc41449ad0 Mon Sep 17 00:00:00 2001 From: DoctorKnowsBetter <111871367+DoctorKnowsBetter@users.noreply.github.com> Date: Mon, 15 May 2023 03:54:36 +0300 Subject: [PATCH] feat: add NvimTreeSymlinkIcon (#2198) * #2193 Add the ability to change the icon color for "symlink_formatted" * Remove defaults and update doc #2198 --------- Co-authored-by: DoctorKnowsBetter Co-authored-by: Alexander Courtis --- doc/nvim-tree-lua.txt | 1 + lua/nvim-tree/renderer/builder.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 8a3f6969..3954f014 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -2031,6 +2031,7 @@ as per |:highlight| Default linked group follows name. NvimTreeSymlink +NvimTreeSymlinkIcon NvimTreeSymlinkFolderName (Directory) NvimTreeFolderName (Directory) NvimTreeRootFolder diff --git a/lua/nvim-tree/renderer/builder.lua b/lua/nvim-tree/renderer/builder.lua index 4ffded19..4478afd1 100644 --- a/lua/nvim-tree/renderer/builder.lua +++ b/lua/nvim-tree/renderer/builder.lua @@ -173,8 +173,9 @@ function Builder:_build_symlink(node) end local link_highlight = "NvimTreeSymlink" + local icon_hl = "NvimTreeSymlinkIcon" - return { str = icon }, { str = symlink_formatted, hl = link_highlight } + return { str = icon, hl = icon_hl }, { str = symlink_formatted, hl = link_highlight } end ---@param node table