Skip to content

fix(icon_config): don't ignore git_icons user configuration #1286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kawaemon
Copy link

I found out that the current implementation ignores git icons configuration by users. The diff below fixes this issue, but I used the built-in function vim.tbl_deep_extend in this PR because it is simple and prevents this kind of easy miss.

diff --git a/lua/nvim-tree/renderer/icon-config.lua b/lua/nvim-tree/renderer/icon-config.lua
index e6d8cfd..9990afb 100644
--- a/lua/nvim-tree/renderer/icon-config.lua
+++ b/lua/nvim-tree/renderer/icon-config.lua
@@ -35,7 +35,7 @@ function M.get_config()
     if user_icons.symlink then
       icons.symlink = user_icons.symlink
     end
-    for key, val in pairs(user_icons.git or {}) do
+    for key, val in pairs(user_icons.git_icons or {}) do
       if icons.git_icons[key] then
         icons.git_icons[key] = val
       end

@kawaemon
Copy link
Author

looks like this issue will be fixed by #1279. never mind.

@kawaemon kawaemon closed this May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant