nvim-tree / nvim-tree/nvim-tree.lua

Allow reloading tree to update icons' colours via nvim-web-devicons

Open
#2,073 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Lua
Stars
8.6k
Forks
639
Avg merge
1d 14h
Merged PRs (30d)
2

Description

Can this functionality be implemented utilising API?
Don't think so. api.tree.reload() didn't do the trick.

Is your feature request related to a problem? Please describe.
Icons do not change colour after background was changed.
nvim-web-devicons supports light and dark icons now. nvim-tree should allow users to reload icons when background changes.

Describe the solution you'd like
An API function which would reload icons or reinitialise nvmi-tree with current settings only to change icon colours from light to dark or other way around.
This could then be used in auto commands to automate the process.

Describe alternatives you've considered
Handle that internally? Most likely less flexible with greater maintenance cost.

Additional context
Icons look very bad after changing background.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing api.tree.reload() path and how nvim-tree obtains icon colors from nvim-web-devicons. Confirm the behavior after changing Neovim's background setting, then define completion as an API-triggered reload or reinitialization that updates icons from light to dark or vice versa.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.