-
-
Notifications
You must be signed in to change notification settings - Fork 625
#1050 #1068 various default options tweaks #1074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kyazdani42
merged 10 commits into
nvim-tree:master
from
alex-courtis:#1050-#1068-various-default-options
Mar 18, 2022
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cdf0cfa
#1068 remove default options from nvt-min, apply stylua
alex-courtis 3f856fd
#1050 scrapes DEFAULT_OPTS from lua/nvim-tree.lua and updates help, …
alex-courtis f9426ab
\#1050 move view option defaults to DEFAULT_OPTS
alex-courtis fb5ba22
#1050 add trash option defaults to DEFAULT_OPTS
alex-courtis 34ab038
#1050 move window picker option defaults to DEFAULT_OPTS
alex-courtis 59c0444
#1050 move window picker option defaults to DEFAULT_OPTS
alex-courtis fe59317
#1050 add mapping defaults to DEFAULT_OPTS
alex-courtis ac503b3
#1050 add empty setup option for new users
alex-courtis 27e4b74
#1050 add note: where to put user mappings
alex-courtis 7f69a01
Merge branch 'master' into #1050-#1068-various-default-options
alex-courtis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,68 +108,76 @@ highlight NvimTreeFolderIcon guibg=blue | |
```lua | ||
-- init.lua | ||
|
||
-- following options are the default | ||
-- empty setup using defaults: add your own options | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would have been very useful for me when starting out with nvim-tree. I thought you had to specify all the options 🤦 |
||
require'nvim-tree'.setup { | ||
} | ||
|
||
-- OR | ||
|
||
-- setup with all defaults | ||
-- each of these are documented in `:help nvim-tree.OPTION_NAME` | ||
require'nvim-tree'.setup { | ||
disable_netrw = false, | ||
hijack_netrw = true, | ||
open_on_setup = false, | ||
ignore_buffer_on_setup = false, | ||
ignore_ft_on_setup = {}, | ||
auto_close = false, | ||
[//]: <> (BEGIN_DEFAULT_OPTS) | ||
auto_close = false, | ||
auto_reload_on_write = true, | ||
open_on_tab = false, | ||
hijack_cursor = false, | ||
update_cwd = false, | ||
disable_netrw = false, | ||
hide_root_folder = false, | ||
hijack_cursor = false, | ||
hijack_netrw = true, | ||
hijack_unnamed_buffer_when_opening = false, | ||
hijack_directories = { | ||
ignore_buffer_on_setup = false, | ||
open_on_setup = false, | ||
open_on_tab = false, | ||
sort_by = "name", | ||
update_cwd = false, | ||
view = { | ||
width = 30, | ||
height = 30, | ||
side = "left", | ||
preserve_window_proportions = false, | ||
number = false, | ||
relativenumber = false, | ||
signcolumn = "yes", | ||
mappings = { | ||
custom_only = false, | ||
list = { | ||
-- user mappings go here | ||
}, | ||
}, | ||
}, | ||
hijack_directories = { | ||
enable = true, | ||
auto_open = true, | ||
}, | ||
update_focused_file = { | ||
enable = false, | ||
update_cwd = false, | ||
ignore_list = {}, | ||
}, | ||
ignore_ft_on_setup = {}, | ||
system_open = { | ||
cmd = nil, | ||
args = {}, | ||
}, | ||
diagnostics = { | ||
enable = false, | ||
show_on_dirs = false, | ||
icons = { | ||
hint = "", | ||
info = "", | ||
warning = "", | ||
error = "", | ||
} | ||
}, | ||
update_focused_file = { | ||
enable = false, | ||
update_cwd = false, | ||
ignore_list = {} | ||
}, | ||
system_open = { | ||
cmd = nil, | ||
args = {} | ||
}, | ||
}, | ||
filters = { | ||
dotfiles = false, | ||
custom = {} | ||
custom = {}, | ||
exclude = {}, | ||
}, | ||
git = { | ||
enable = true, | ||
ignore = true, | ||
timeout = 500, | ||
}, | ||
view = { | ||
width = 30, | ||
height = 30, | ||
hide_root_folder = false, | ||
side = 'left', | ||
preserve_window_proportions = false, | ||
mappings = { | ||
custom_only = false, | ||
list = {} | ||
}, | ||
number = false, | ||
relativenumber = false, | ||
signcolumn = "yes" | ||
}, | ||
trash = { | ||
cmd = "trash", | ||
require_confirm = true | ||
timeout = 400, | ||
}, | ||
actions = { | ||
change_dir = { | ||
|
@@ -183,11 +191,15 @@ require'nvim-tree'.setup { | |
enable = true, | ||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", | ||
exclude = { | ||
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", }, | ||
buftype = { "nofile", "terminal", "help", }, | ||
} | ||
} | ||
} | ||
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, | ||
buftype = { "nofile", "terminal", "help" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
trash = { | ||
cmd = "trash", | ||
require_confirm = true, | ||
}, | ||
log = { | ||
enable = false, | ||
|
@@ -198,6 +210,7 @@ require'nvim-tree'.setup { | |
git = false, | ||
}, | ||
}, | ||
[//]: <> (END_DEFAULT_OPTS) | ||
} | ||
``` | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stylua