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

git submodule icons in nvim-tree

Open
#3,038 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It would be helpful to have a dedicated icon for Git submodules in the nvim-tree file explorer. Currently, while nvim-tree supports various Git status icons (e.g., staged, unstaged, untracked), there isn’t an option to display a unique icon for submodules.

This would improve the visual distinction of submodule folders and make it easier for users to identify them in the tree view.

Proposed Solution

Allow users to define a custom icon for Git submodules in the renderer.icons.git configuration. For example:

renderer = {
    -- other configurations...
    icons = {
        -- other icons...
        git = {
            -- existing git icons...
            submodule = '',  -- Git submodule icon
        },
    },
},
References

This feature idea was originally discussed here: Does nvim-tree have webicon for git submodules?.

Request

I’d appreciate guidance on how to proceed with implementing this feature.

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 renderer.icons.git configuration and the existing Git status icon handling in nvim-tree. Identify where submodule folders are classified and where icon rendering is tested; done means a configurable submodule icon appears for those folders without changing existing Git status icons.

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
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.