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
Copy file name to clipboardExpand all lines: README.md
+41-51Lines changed: 41 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -32,60 +32,11 @@ use {
32
32
33
33
## Setup
34
34
35
-
Options are currently being migrated into the setup function, you need to run `require'nvim-tree'.setup()` in your personal configurations.
36
35
Setup should be run in a lua file or in a lua heredoc (`:help lua-heredoc`) if using in a vim file.
37
-
Note that options under the `g:`command should be set **BEFORE** running the setup function.
38
-
These are being migrated to the setup function incrementally, check [this issue](https://github.com/kyazdani42/nvim-tree.lua/issues/674) if you encounter any problems related to configs not working after update.
36
+
Legacy `g:`options have been migrated to the setup function. See [this issue](https://github.com/kyazdani42/nvim-tree.lua/issues/674) for information on migrating your configuration.
37
+
39
38
```vim
40
39
" vimrc
41
-
let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
42
-
let g:nvim_tree_highlight_opened_files = 1 "0 by default, will enable folder and file icon highlight for opened files/directories.
43
-
let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
44
-
let g:nvim_tree_add_trailing = 1 "0 by default, append a trailing slash to folder names
45
-
let g:nvim_tree_group_empty = 1 " 0 by default, compact folders that only contain a single folder into one node in the file tree
46
-
let g:nvim_tree_icon_padding = ' ' "one space by default, used for rendering the space between the icon and the filename. Use with caution, it could break rendering if you set an empty string depending on your font.
47
-
let g:nvim_tree_symlink_arrow = ' >> ' " defaults to ' ➛ '. used as a separator between symlinks' source and target.
48
-
let g:nvim_tree_respect_buf_cwd = 1 "0 by default, will change cwd of nvim-tree to that of new buffer's when opening nvim-tree.
49
-
let g:nvim_tree_create_in_closed_folder = 1 "0 by default, When creating files, sets the path of a file when cursor is on a closed folder to the parent folder when 0, and inside the folder when 1.
50
-
let g:nvim_tree_special_files = { 'README.md': 1, 'Makefile': 1, 'MAKEFILE': 1 } " List of filenames that gets highlighted with NvimTreeSpecialFile
51
-
let g:nvim_tree_show_icons = {
52
-
\ 'git': 1,
53
-
\ 'folders': 0,
54
-
\ 'files': 0,
55
-
\ 'folder_arrows': 0,
56
-
\ }
57
-
"If 0, do not show the icons for one of 'git' 'folder' and 'files'
58
-
"1 by default, notice that if 'files' is 1, it will only display
59
-
"if nvim-web-devicons is installed and on your runtimepath.
60
-
"if folder is 1, you can also tell folder_arrows 1 to show small arrows next to the folder icons.
61
-
"but this will not work when you set renderer.indent_markers.enable (because of UI conflict)
62
-
63
-
" default will show icon by default if no icon is provided
64
-
" default shows no icon by default
65
-
let g:nvim_tree_icons = {
66
-
\ 'default': "",
67
-
\ 'symlink': "",
68
-
\ 'git': {
69
-
\ 'unstaged': "✗",
70
-
\ 'staged': "✓",
71
-
\ 'unmerged': "",
72
-
\ 'renamed': "➜",
73
-
\ 'untracked': "★",
74
-
\ 'deleted': "",
75
-
\ 'ignored': "◌"
76
-
\ },
77
-
\ 'folder': {
78
-
\ 'arrow_open': "",
79
-
\ 'arrow_closed': "",
80
-
\ 'default': "",
81
-
\ 'open': "",
82
-
\ 'empty': "",
83
-
\ 'empty_open': "",
84
-
\ 'symlink': "",
85
-
\ 'symlink_open': "",
86
-
\ }
87
-
\ }
88
-
89
40
nnoremap <C-n> :NvimTreeToggle<CR>
90
41
nnoremap <leader>r :NvimTreeRefresh<CR>
91
42
nnoremap <leader>n :NvimTreeFindFile<CR>
@@ -118,6 +69,7 @@ require'nvim-tree'.setup {
118
69
-- nested options are documented by accessing them with `.` (eg: `:help nvim-tree.view.mappings.list`).
0 commit comments