You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add user config for hiding the root item in the file tree (jesseduffield#4593)
- **PR Description**
In jesseduffield#4346 we added a `/` root item in the Files and CommitFiles panels
whenever there is more than one top-level item. We made it
unconditional, but I promised to add a config as soon as users ask for
being able to disable it. For a while I was able to convince users who
asked for it that it is useful and they don't want to turn it off, but
now there's a [stronger
request](jesseduffield#4590 (reply in thread))
from someone who refuses to upgrade to the current version, and we don't
want that.
So, add a config option `gui.showRootItemInFileTree` that is true by
default.
Copy file name to clipboardExpand all lines: docs/Config.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,9 @@ gui:
190
190
# This can be toggled from within Lazygit with the '`' key, but that will not change the default.
191
191
showFileTree: true
192
192
193
+
# If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.
194
+
showRootItemInFileTree: true
195
+
193
196
# If true, show the number of lines changed per file in the Files view
Copy file name to clipboardExpand all lines: pkg/config/user_config.go
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,8 @@ type GuiConfig struct {
123
123
// If true, display the files in the file views as a tree. If false, display the files as a flat list.
124
124
// This can be toggled from within Lazygit with the '`' key, but that will not change the default.
125
125
ShowFileTreebool`yaml:"showFileTree"`
126
+
// If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.
0 commit comments