Skip to content

Commit 857008f

Browse files
authored
docs(filesystem): update filtered items section (#1869)
1 parent 72485bf commit 857008f

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ require("neo-tree").setup({
466466
-- other gitignore-like files, in descending order of precedence.
467467
ignore_files = {
468468
".neotreeignore",
469-
-- ".ignore"
469+
".ignore",
470470
-- ".rgignore"
471471
},
472472
hide_hidden = true, -- only works on Windows for hidden files/directories

doc/neo-tree.txt

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,19 @@ highlight group which will be applied when they are visible, see
985985
require("neo-tree").setup({
986986
filesystem = {
987987
filtered_items = {
988-
visible = false, -- when true, they will just be displayed differently than normal items
988+
-- when true, they will just be displayed differently than normal items
989+
visible = false,
990+
-- whether children of filtered parents should inherit their parent's highlight group
991+
children_inherit_highlights = true,
989992
hide_dotfiles = true,
990993
hide_gitignored = true,
994+
hide_ignored = true, -- hide files that are ignored by other gitignore-like files
995+
-- other gitignore-like files, in descending order of precedence.
996+
ignore_files = {
997+
".neotreeignore",
998+
".ignore",
999+
-- ".rgignore"
1000+
},
9911001
hide_hidden = true, -- only works on Windows for hidden files/directories
9921002
hide_by_name = {
9931003
".DS_Store",
@@ -1019,16 +1029,29 @@ highlight group which will be applied when they are visible, see
10191029
The `visible` option just defines the default value. This value is toggled by
10201030
the "toggle_hidden" command, which is mapped to H by default.
10211031

1032+
The `children_inherit_highlights` option specifies whether children of filtered
1033+
items should inherit the parent's (filtered) highlight. This is useful if you
1034+
are editing inside filtered directories and want more detailed highlights in the
1035+
tree.
1036+
10221037
The `hide_dotfiles` option just hides anything that starts with `. `(period).
10231038

10241039
The `hide_gitignored` option will query git for the files and folders being
10251040
shown, and hide those that are marked as ignored.
10261041

1027-
The `hide_hidden` option only will work on Windows using the Windows logic
1028-
that determines if a file or directory is hidden.
1042+
The `hide_ignored` option will hide files that match the patterns found in
1043+
`ignore_files`.
1044+
1045+
The `ignore_files` options specifies which gitignore-like files should be
1046+
respected. If two ignore files are at the same level, the `ignore_files` option
1047+
is in descending order of precedence, so the first file specified should win
1048+
(e.g. `.neotreeignore` over `.ignore`).
1049+
1050+
The `hide_hidden` option checks a Windows-specific API to determine if a file or
1051+
directory is hidden in the Windows sense.
10291052

1030-
The `hide_by_name` option is a list of file/folder names that should be
1031-
hidden. This is an exact match.
1053+
The `hide_by_name` option is a list of file/folder names that should be hidden.
1054+
This is an exact match.
10321055

10331056
The `hide_by_pattern` option uses glob syntax, which is converted to lua
10341057
patterns. No guarantees on how it handles advanced patterns.
@@ -1463,6 +1486,8 @@ NeoTreeGitUnstaged Used for git unstaged symbol.
14631486
NeoTreeGitUntracked File name when the git status is untracked.
14641487
NeoTreeGitStaged Used for git staged symbol.
14651488
NeoTreeHiddenByName Used for icons and names when `hide_by_name` is used.
1489+
NeoTreeIgnored File name when the file is ignored by a
1490+
`.neotreeignore` or similar
14661491
NeoTreeIndentMarker The style of indentation markers (guides). By default,
14671492
the "Normal" highlight is used.
14681493
NeoTreeExpander Used for collapsed/expanded icons.

lua/neo-tree/defaults.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ local config = {
524524
-- other gitignore-like files, in descending order of precedence.
525525
ignore_files = {
526526
".neotreeignore",
527-
".ignore"
527+
".ignore",
528528
-- ".rgignore"
529529
},
530530
hide_hidden = true, -- only works on Windows for hidden files/directories

0 commit comments

Comments
 (0)