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

Add an option to modify tree padding/indentation

Open
#2,023 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I think adding an indent/padding to the tree would be nice.

Describe the solution you'd like

Add an option to modify the padding/indent of children in the tree (components/padding.lua)

function M.get_padding(depth, idx, nodes_number, node, markers) local padding = " "

Describe alternatives you've considered

Editing the source file directly and adding a space " ".

Before:

20230224_174905

After:

20230224_174939

It looks a bit nicer!

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 reading components/padding.lua and the get_padding function named in the issue. Trace how tree children receive their current padding and how options are exposed. Done means users can configure child indentation without editing the source file, while the existing tree output remains unchanged by default.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.