Skip to content

Commit f70ab3e

Browse files
committed
doc: add help nvim-tree-legacy
1 parent 030defd commit f70ab3e

File tree

2 files changed

+95
-62
lines changed

2 files changed

+95
-62
lines changed

doc/nvim-tree-lua.txt

+92-60
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,15 @@ CONTENTS *nvim-tree*
4848
7. Mappings |nvim-tree-mappings|
4949
7.1 Mappings: Default |nvim-tree-mappings-default|
5050
8. Highlight |nvim-tree-highlight|
51-
8.1 Highlight Default |nvim-tree-highlight-default|
52-
8.2 Highlight Overhaul |nvim-tree-highlight-overhaul|
51+
8.1 Highlight: Default |nvim-tree-highlight-default|
52+
8.2 Highlight: Overhaul |nvim-tree-highlight-overhaul|
5353
9. Events |nvim-tree-events|
5454
10. Prompts |nvim-tree-prompts|
5555
11. OS Specific Restrictions |nvim-tree-os-specific|
5656
12. Netrw |nvim-tree-netrw|
57+
13. Legacy |nvim-tree-legacy|
58+
13.1 Legacy: Opts |nvim-tree-legacy-opts|
59+
13.2 Legacy: Highlight |nvim-tree-legacy-highlight|
5760

5861
==============================================================================
5962
1. INTRODUCTION *nvim-tree-introduction*
@@ -672,7 +675,7 @@ Prefer startup root directory when updating root directory of the tree.
672675
Only relevant when `update_focused_file.update_root` is `true`
673676
Type: `boolean`, Default: `false`
674677

675-
*nvim-tree.sync_root_with_cwd* (previously `update_cwd`)
678+
*nvim-tree.sync_root_with_cwd*
676679
Changes the tree root directory on `DirChanged` and refreshes the tree.
677680
Type: `boolean`, Default: `false`
678681

@@ -694,7 +697,7 @@ Type: `boolean`, Default: `false`
694697

695698
File and folder sorting options.
696699

697-
*nvim-tree.sort.sorter* (previously `sort_by`)
700+
*nvim-tree.sort.sorter*
698701
Changes how files within the same directory are sorted.
699702
Can be one of `"name"`, `"case_sensitive"`, `"modification_time"`, `"extension"`,
700703
`"suffix"`, `"filetype"` or a function.
@@ -773,7 +776,7 @@ Show |signcolumn|. Value can be `"yes"`, `"auto"`, `"no"`.
773776
Width of the window: can be a `%` string, a number representing columns, a
774777
function or a table.
775778
A table indicates that the view should be dynamically sized based on the
776-
longest line (previously `view.adaptive_size`).
779+
longest line.
777780
Type: `string | number | table | function()` returning a number
778781
Default: `30`
779782

@@ -1093,7 +1096,6 @@ Enable this feature.
10931096
Type: `boolean`, Default: `false`
10941097

10951098
*nvim-tree.update_focused_file.update_root*
1096-
(previously `update_focused_file.update_cwd`)
10971099
Update the root directory of the tree if the file is not under current
10981100
root directory. It prefers vim's cwd and `root_dirs`.
10991101
Otherwise it falls back to the folder containing the file.
@@ -1236,7 +1238,7 @@ Only relevant when |modified.show_on_dirs| is `true`.
12361238

12371239
File / folder filters that may be toggled.
12381240

1239-
*nvim-tree.filters.git_ignored* (previously `git.ignore`)
1241+
*nvim-tree.filters.git_ignored*
12401242
Ignore files based on `.gitignore`. Requires |git.enable| `= true`
12411243
Toggle via |nvim-tree-api.tree.toggle_gitignore_filter()|, default `I`
12421244
Type: `boolean`, Default: `true`
@@ -1383,7 +1385,7 @@ Configuration options for opening a file from nvim-tree.
13831385
Prevent new opened file from opening in the same window as the tree.
13841386
Type: `boolean`, Default: `true`
13851387

1386-
*nvim-tree.actions.open_file.resize_window* (previously `view.auto_resize`)
1388+
*nvim-tree.actions.open_file.resize_window*
13871389
Resizes the tree when opening a file.
13881390
Type: `boolean`, Default: `true`
13891391

@@ -1451,7 +1453,7 @@ Windows default `"trash"` requires `trash-cli` or similar
14511453
*nvim-tree.tab.sync*
14521454
Configuration for syncing nvim-tree across tabs.
14531455

1454-
*nvim-tree.tab.sync.open* (previously `nvim-tree.open_on_tab`)
1456+
*nvim-tree.tab.sync.open*
14551457
Opens the tree automatically when switching tabpage or opening a new
14561458
tabpage if the tree was previously open.
14571459
Type: `boolean`, Default: `false`
@@ -1460,7 +1462,7 @@ Configuration for syncing nvim-tree across tabs.
14601462
Closes the tree across all tabpages when the tree is closed.
14611463
Type: `boolean`, Default: `false`
14621464

1463-
*nvim-tree.tab.sync.ignore* (previously `nvim-tree.ignore_buf_on_tab_change`)
1465+
*nvim-tree.tab.sync.ignore*
14641466
List of filetypes or buffer names on new tab that will prevent
14651467
|nvim-tree.tab.sync.open| and |nvim-tree.tab.sync.close|
14661468
Type: {string}, Default: `{}`
@@ -1500,7 +1502,7 @@ Confirmation prompts.
15001502
Prompt before removing.
15011503
Type: `boolean`, Default: `true`
15021504

1503-
*nvim-tree.ui.confirm.trash* (previously `trash.require_confirm`)
1505+
*nvim-tree.ui.confirm.trash*
15041506
Prompt before trashing.
15051507
Type: `boolean`, Default: `true`
15061508

@@ -2308,7 +2310,7 @@ To prevent usage of a highlight:
23082310
`:hi! link NvimTreeExecFile NONE`
23092311

23102312
==============================================================================
2311-
8.1 HIGHLIGHT DEFAULT *nvim-tree-highlight-default*
2313+
8.1 HIGHLIGHT: DEFAULT *nvim-tree-highlight-default*
23122314

23132315
|:highlight-link| `default` or |:highlight-default| define the groups on setup:
23142316

@@ -2426,7 +2428,9 @@ Diagnostics Folder Highlight: >
24262428
NvimTreeDiagnosticHintFolderHL NvimTreeDiagnosticHintFileHL
24272429
<
24282430
==============================================================================
2429-
8.1 HIGHLIGHT OVERHAUL *nvim-tree-highlight-overhaul*
2431+
8.2 HIGHLIGHT: OVERHAUL *nvim-tree-highlight-overhaul*
2432+
2433+
See |nvim-tree-legacy-highlight| for old highlight group compatibility.
24302434

24312435
2024-01-20: significant highlighting changes, some breaking:
24322436

@@ -2460,52 +2464,6 @@ Approximate pre-overhaul values for the `SpellCap` groups may be set via: >
24602464
:hi NvimTreeImageFile gui=bold guifg=#ff80ff
24612465
]])
24622466
<
2463-
Legacy highlight group are still obeyed when they are defined and the current
2464-
highlight group is not, hard linking as follows: >
2465-
2466-
NvimTreeModifiedIcon NvimTreeModifiedFile
2467-
NvimTreeOpenedHL NvimTreeOpenedFile
2468-
NvimTreeBookmarkIcon NvimTreeBookmark
2469-
2470-
NvimTreeGitDeletedIcon NvimTreeGitDeleted
2471-
NvimTreeGitDirtyIcon NvimTreeGitDirty
2472-
NvimTreeGitIgnoredIcon NvimTreeGitIgnored
2473-
NvimTreeGitMergeIcon NvimTreeGitMerge
2474-
NvimTreeGitNewIcon NvimTreeGitNew
2475-
NvimTreeGitRenamedIcon NvimTreeGitRenamed
2476-
NvimTreeGitStagedIcon NvimTreeGitStaged
2477-
2478-
NvimTreeGitFileDeletedHL NvimTreeFileDeleted
2479-
NvimTreeGitFileDirtyHL NvimTreeFileDirty
2480-
NvimTreeGitFileIgnoredHL NvimTreeFileIgnored
2481-
NvimTreeGitFileMergeHL NvimTreeFileMerge
2482-
NvimTreeGitFileNewHL NvimTreeFileNew
2483-
NvimTreeGitFileRenamedHL NvimTreeFileRenamed
2484-
NvimTreeGitFileStagedHL NvimTreeFileStaged
2485-
2486-
NvimTreeGitFolderDeletedHL NvimTreeFolderDeleted
2487-
NvimTreeGitFolderDirtyHL NvimTreeFolderDirty
2488-
NvimTreeGitFolderIgnoredHL NvimTreeFolderIgnored
2489-
NvimTreeGitFolderMergeHL NvimTreeFolderMerge
2490-
NvimTreeGitFolderNewHL NvimTreeFolderNew
2491-
NvimTreeGitFolderRenamedHL NvimTreeFolderRenamed
2492-
NvimTreeGitFolderStagedHL NvimTreeFolderStaged
2493-
2494-
NvimTreeLspDiagnosticsError NvimTreeDiagnosticErrorIcon
2495-
NvimTreeLspDiagnosticsWarning NvimTreeDiagnosticWarnIcon
2496-
NvimTreeLspDiagnosticsInformation NvimTreeDiagnosticInfoIcon
2497-
NvimTreeLspDiagnosticsHint NvimTreeDiagnosticHintIcon
2498-
2499-
NvimTreeLspDiagnosticsErrorText NvimTreeDiagnosticErrorFileHL
2500-
NvimTreeLspDiagnosticsWarningText NvimTreeDiagnosticWarnFileHL
2501-
NvimTreeLspDiagnosticsInformationText NvimTreeDiagnosticInfoFileHL
2502-
NvimTreeLspDiagnosticsHintText NvimTreeDiagnosticHintFileHL
2503-
2504-
NvimTreeLspDiagnosticsErrorFolderText NvimTreeDiagnosticErrorFolderHL
2505-
NvimTreeLspDiagnosticsWarningFolderText NvimTreeDiagnosticWarnFolderHL
2506-
NvimTreeLspDiagnosticsInformationFolderText NvimTreeDiagnosticInfoFolderHL
2507-
NvimTreeLspDiagnosticsHintFolderText NvimTreeDiagnosticHintFolderHL
2508-
<
25092467
==============================================================================
25102468
9. EVENTS *nvim-tree-events*
25112469

@@ -2658,7 +2616,7 @@ Windows WSL and PowerShell
26582616
- Some filesystem watcher error related to permissions will not be reported
26592617

26602618
==============================================================================
2661-
12. NETRW *nvim-tree-netrw*
2619+
12. NETRW *nvim-tree-netrw*
26622620

26632621
|netrw| is a standard neovim plugin that is enabled by default. It provides,
26642622
amongst other functionality, a file/directory browser.
@@ -2678,4 +2636,78 @@ keep using |netrw| without its browser features please ensure:
26782636
|nvim-tree.disable_netrw| `= false`
26792637
|nvim-tree.hijack_netrw| ` = true`
26802638

2639+
==============================================================================
2640+
13. LEGACY *nvim-tree-legacy*
2641+
2642+
Breaking refactors have been made however the legacy versions will be silently
2643+
migrated and used.
2644+
There are no plans to remove this migration.
2645+
2646+
==============================================================================
2647+
13.1 LEGACY: OPTS *nvim-tree-legacy-opts*
2648+
2649+
Legacy options are translated to the current, making type and value changes as
2650+
needed.
2651+
2652+
`update_cwd` |nvim-tree.sync_root_with_cwd|
2653+
`update_focused_file.update_cwd` |nvim-tree.update_focused_file.update_root|
2654+
`open_on_tab` |nvim-tree.tab.sync.open|
2655+
`ignore_buf_on_tab_change` |nvim-tree.tab.sync.ignore|
2656+
`renderer.root_folder_modifier` |nvim-tree.renderer.root_folder_label|
2657+
`update_focused_file.debounce_delay` |nvim-tree.view.debounce_delay|
2658+
`trash.require_confirm` |nvim-tree.ui.confirm.trash|
2659+
`view.adaptive_size` |nvim-tree.view.width|
2660+
`sort_by` |nvim-tree.sort.sorter|
2661+
`git.ignore` |nvim-tree.filters.git_ignored|
2662+
`renderer.icons.webdev_colors` |nvim-tree.renderer.icons.web_devicons.file.color|
2663+
2664+
==============================================================================
2665+
13.2 LEGACY: HIGHLIGHT *nvim-tree-legacy-highlight*
2666+
2667+
Legacy highlight group are still obeyed when they are defined and the current
2668+
highlight group is not, hard linking as follows: >
2669+
2670+
NvimTreeModifiedIcon NvimTreeModifiedFile
2671+
NvimTreeOpenedHL NvimTreeOpenedFile
2672+
NvimTreeBookmarkIcon NvimTreeBookmark
2673+
2674+
NvimTreeGitDeletedIcon NvimTreeGitDeleted
2675+
NvimTreeGitDirtyIcon NvimTreeGitDirty
2676+
NvimTreeGitIgnoredIcon NvimTreeGitIgnored
2677+
NvimTreeGitMergeIcon NvimTreeGitMerge
2678+
NvimTreeGitNewIcon NvimTreeGitNew
2679+
NvimTreeGitRenamedIcon NvimTreeGitRenamed
2680+
NvimTreeGitStagedIcon NvimTreeGitStaged
2681+
2682+
NvimTreeGitFileDeletedHL NvimTreeFileDeleted
2683+
NvimTreeGitFileDirtyHL NvimTreeFileDirty
2684+
NvimTreeGitFileIgnoredHL NvimTreeFileIgnored
2685+
NvimTreeGitFileMergeHL NvimTreeFileMerge
2686+
NvimTreeGitFileNewHL NvimTreeFileNew
2687+
NvimTreeGitFileRenamedHL NvimTreeFileRenamed
2688+
NvimTreeGitFileStagedHL NvimTreeFileStaged
2689+
2690+
NvimTreeGitFolderDeletedHL NvimTreeFolderDeleted
2691+
NvimTreeGitFolderDirtyHL NvimTreeFolderDirty
2692+
NvimTreeGitFolderIgnoredHL NvimTreeFolderIgnored
2693+
NvimTreeGitFolderMergeHL NvimTreeFolderMerge
2694+
NvimTreeGitFolderNewHL NvimTreeFolderNew
2695+
NvimTreeGitFolderRenamedHL NvimTreeFolderRenamed
2696+
NvimTreeGitFolderStagedHL NvimTreeFolderStaged
2697+
2698+
NvimTreeLspDiagnosticsError NvimTreeDiagnosticErrorIcon
2699+
NvimTreeLspDiagnosticsWarning NvimTreeDiagnosticWarnIcon
2700+
NvimTreeLspDiagnosticsInformation NvimTreeDiagnosticInfoIcon
2701+
NvimTreeLspDiagnosticsHint NvimTreeDiagnosticHintIcon
2702+
2703+
NvimTreeLspDiagnosticsErrorText NvimTreeDiagnosticErrorFileHL
2704+
NvimTreeLspDiagnosticsWarningText NvimTreeDiagnosticWarnFileHL
2705+
NvimTreeLspDiagnosticsInformationText NvimTreeDiagnosticInfoFileHL
2706+
NvimTreeLspDiagnosticsHintText NvimTreeDiagnosticHintFileHL
2707+
2708+
NvimTreeLspDiagnosticsErrorFolderText NvimTreeDiagnosticErrorFolderHL
2709+
NvimTreeLspDiagnosticsWarningFolderText NvimTreeDiagnosticWarnFolderHL
2710+
NvimTreeLspDiagnosticsInformationFolderText NvimTreeDiagnosticInfoFolderHL
2711+
NvimTreeLspDiagnosticsHintFolderText NvimTreeDiagnosticHintFolderHL
2712+
<
26812713
vim:tw=78:ts=4:sw=4:et:ft=help:norl:

lua/nvim-tree/legacy.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local notify = require "nvim-tree.notify"
33

44
local M = {}
55

6+
-- silently move, please add to help nvim-tree-legacy-opts
67
local function refactored(opts)
78
-- 2022/06/20
89
utils.move_missing_val(opts, "update_focused_file", "update_cwd", opts, "update_focused_file", "update_root", true)
@@ -61,12 +62,12 @@ end
6162

6263
local function removed(opts)
6364
if opts.auto_close then
64-
notify.warn "auto close feature has been removed, see note in the README (tips & reminder section)"
65+
notify.warn "auto close feature has been removed: https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close"
6566
opts.auto_close = nil
6667
end
6768

6869
if opts.focus_empty_on_setup then
69-
notify.warn "focus_empty_on_setup has been removed and will be replaced by a new startup configuration. Please remove this option. See https://bit.ly/3yJch2T"
70+
notify.warn "focus_empty_on_setup has been removed: https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup"
7071
opts.focus_empty_on_setup = nil
7172
end
7273

0 commit comments

Comments
 (0)