From cdf0cfaa92b48a2db3e5a1065b4e03e237aa24ed Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 12:36:25 +1100 Subject: [PATCH 1/9] #1068 remove default options from nvt-min, apply stylua --- .github/ISSUE_TEMPLATE/bug_report.yml | 96 ++++----------------------- 1 file changed, 12 insertions(+), 84 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 86d1ed2bfe1..0e79a42bbed 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -63,108 +63,36 @@ body: value: | vim.cmd [[set runtimepath=$VIMRUNTIME]] vim.cmd [[set packpath=/tmp/nvt-min/site]] - local package_root = '/tmp/nvt-min/site/pack' - local install_path = package_root .. '/packer/start/packer.nvim' + local package_root = "/tmp/nvt-min/site/pack" + local install_path = package_root .. "/packer/start/packer.nvim" local function load_plugins() - require('packer').startup { + require("packer").startup { { - 'wbthomason/packer.nvim', - 'kyazdani42/nvim-tree.lua', - 'kyazdani42/nvim-web-devicons', + "wbthomason/packer.nvim", + "kyazdani42/nvim-tree.lua", + "kyazdani42/nvim-web-devicons", -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE }, config = { package_root = package_root, - compile_path = install_path .. '/plugin/packer_compiled.lua', + compile_path = install_path .. "/plugin/packer_compiled.lua", display = { non_interactive = true }, }, } end if vim.fn.isdirectory(install_path) == 0 then - print("Installing nvim-tree and dependencies.") - vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path } + print "Installing nvim-tree and dependencies." + vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path } end load_plugins() - require('packer').sync() + require("packer").sync() vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]] vim.opt.termguicolors = true vim.opt.cursorline = true - + -- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE _G.setup = function() - vim.g.nvim_tree_indent_markers = 0 - vim.g.nvim_tree_git_hl = 0 - vim.g.nvim_tree_highlight_opened_files = 0 - vim.g.nvim_tree_root_folder_modifier = ':~' - vim.g.nvim_tree_add_trailing = 0 - vim.g.nvim_tree_group_empty = 0 - vim.g.nvim_tree_icon_padding = ' ' - vim.g.nvim_tree_symlink_arrow = ' ➛ ' - vim.g.nvim_tree_respect_buf_cwd = 0 - vim.g.nvim_tree_create_in_closed_folder = 0 - vim.g.nvim_tree_special_files = { ["Cargo.toml"] = true, Makefile = true, ["README.md"] = true, ["readme.md"] = true, } - vim.g.nvim_tree_show_icons = { git = 1, folders = 1, files = 1, folder_arrows = 1 } - require'nvim-tree'.setup { - auto_close = false, - auto_reload_on_write = true, - disable_netrw = false, - hide_root_folder = false, - hijack_cursor = false, - hijack_netrw = true, - hijack_unnamed_buffer_when_opening = false, - ignore_buffer_on_setup = false, - open_on_setup = false, - open_on_tab = false, - sort_by = "name", - update_cwd = false, - 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 = "", - } - }, - filters = { - dotfiles = false, - custom = {}, - exclude = {} - }, - git = { - enable = true, - ignore = true, - timeout = 400, - }, - actions = { - change_dir = { - enable = true, - global = false, - }, - open_file = { - quit_on_open = false, - resize_window = false, - window_picker = { - enable = true, - } - } - }, - } + require("nvim-tree").setup {} end validations: required: true From 3f856fdf485108129bc82100cf99ac8f59948e44 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 13:09:01 +1100 Subject: [PATCH 2/9] #1050 scrapes DEFAULT_OPTS from lua/nvim-tree.lua and updates help, readme --- README.md | 77 ++++++++++++------------------ doc/nvim-tree-lua.txt | 103 +++++++++++++++++------------------------ lua/nvim-tree.lua | 4 +- update-default-opts.sh | 21 +++++++++ 4 files changed, 95 insertions(+), 110 deletions(-) create mode 100755 update-default-opts.sh diff --git a/README.md b/README.md index b0c0a8efeed..cf582db9a62 100644 --- a/README.md +++ b/README.md @@ -111,65 +111,52 @@ highlight NvimTreeFolderIcon guibg=blue -- following options are the default -- 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, + 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 = { @@ -181,13 +168,8 @@ require'nvim-tree'.setup { resize_window = false, window_picker = { enable = true, - chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", - exclude = { - filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", }, - buftype = { "nofile", "terminal", "help", }, - } - } - } + }, + }, }, log = { enable = false, @@ -197,6 +179,7 @@ require'nvim-tree'.setup { git = false, }, }, +[//]: <> (END_DEFAULT_OPTS) } ``` diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 9c452729e98..23996fa1a4f 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -83,24 +83,34 @@ To configure the tree (and make it runnable), you should call the setup function. > - require'nvim-tree'.setup { - disable_netrw = false, - hijack_netrw = true, - open_on_setup = false, + require("nvim-tree").setup { -- BEGIN_DEFAULT_OPTS + auto_close = false, + auto_reload_on_write = true, + disable_netrw = false, + hide_root_folder = false, + hijack_cursor = false, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = false, ignore_buffer_on_setup = false, - ignore_ft_on_setup = {}, - hijack_directories = { + open_on_setup = false, + open_on_tab = false, + sort_by = "name", + update_cwd = false, + hijack_directories = { enable = true, auto_open = true, }, - auto_close = false, - auto_reload_on_write = true, - open_on_tab = false, - sort_by = "name", - hijack_cursor = false, - update_cwd = false, - hijack_unnamed_buffer_when_opening = false, - diagnostics = { + 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 = { @@ -108,41 +118,17 @@ function. info = "", warning = "", error = "", - } - }, - update_focused_file = { - enable = false, - update_cwd = false, - ignore_list = {} + }, }, - system_open = { - cmd = nil, - args = {} + filters = { + dotfiles = false, + custom = {}, + exclude = {}, }, git = { enable = true, ignore = true, - }, - view = { - width = 30, - height = 30, - side = 'left', - preserve_window_proportions = false, - number = false, - relativenumber = false, - signcolumn = "yes", - mappings = { - custom_only = false, - list = {} - } - }, - filters = { - dotfiles = false, - custom = {} - }, - trash = { - cmd = "trash", - require_confirm = true, + timeout = 400, }, actions = { change_dir = { @@ -150,27 +136,22 @@ function. global = false, }, open_file = { - quit_on_open = false, - resize_window = false, - window_picker = { - enable = true, - chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", - exclude = { - filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", }, - buftype = { "nofile", "terminal", "help", }, - } - } + quit_on_open = false, + resize_window = false, + window_picker = { + enable = true, + }, }, }, log = { - enable = false, - types = { - all = false, - config = false, - git = false, - }, + enable = false, + types = { + all = false, + config = false, + git = false, + }, }, - } + } -- END_DEFAULT_OPTS < As options are currently being migrated, configuration of global options in diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 0e34056144d..a9c8d9a655f 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -333,7 +333,7 @@ local function setup_autocommands(opts) vim.cmd "augroup end" end -local DEFAULT_OPTS = { +local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS auto_close = false, auto_reload_on_write = true, disable_netrw = false, @@ -401,7 +401,7 @@ local DEFAULT_OPTS = { git = false, }, }, -} +} -- END_DEFAULT_OPTS local function merge_options(conf) if conf and conf.update_to_buf_dir then diff --git a/update-default-opts.sh b/update-default-opts.sh new file mode 100755 index 00000000000..ec11437afcd --- /dev/null +++ b/update-default-opts.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# run after changing nvim-tree.lua DEFAULT_OPTS: scrapes and updates README.md, nvim-tree-lua.txt + +begin="BEGIN_DEFAULT_OPTS" +end="END_DEFAULT_OPTS" + +# scrape, indented at 2 +sed -n -e "/${begin}/,/${end}/{ /${begin}/d; /${end}/d; p; }" lua/nvim-tree.lua > /tmp/DEFAULT_OPTS.2.lua + +# indent some more +sed -e "s/^ / /" /tmp/DEFAULT_OPTS.2.lua > /tmp/DEFAULT_OPTS.6.lua + +# README.md indented at 2 +sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_OPTS.2.lua + }; /${end}/p; d }" README.md + +# help, indented at 6 +sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_OPTS.6.lua + }; /${end}/p; d }" doc/nvim-tree-lua.txt + From f9426ab0a7e59367e4fea3fe014c281d5e6fb987 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 13:48:01 +1100 Subject: [PATCH 3/9] \#1050 move view option defaults to DEFAULT_OPTS --- README.md | 9 +++++++++ doc/nvim-tree-lua.txt | 9 +++++++++ lua/nvim-tree.lua | 9 +++++++++ lua/nvim-tree/view.lua | 12 +----------- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cf582db9a62..5cea7ee2711 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,15 @@ require'nvim-tree'.setup { 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", + }, hijack_directories = { enable = true, auto_open = true, diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 23996fa1a4f..074823817d3 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -96,6 +96,15 @@ function. 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", + }, hijack_directories = { enable = true, auto_open = true, diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index a9c8d9a655f..e71489c1c80 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -346,6 +346,15 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS 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", + }, hijack_directories = { enable = true, auto_open = true, diff --git a/lua/nvim-tree/view.lua b/lua/nvim-tree/view.lua index 95495439637..f689659da57 100644 --- a/lua/nvim-tree/view.lua +++ b/lua/nvim-tree/view.lua @@ -348,18 +348,8 @@ function M.is_root_folder_visible() return core.get_cwd() ~= "/" and not M.View.hide_root_folder end -local DEFAULT_CONFIG = { - width = 30, - height = 30, - side = "left", - preserve_window_proportions = false, - number = false, - relativenumber = false, - signcolumn = "yes", -} - function M.setup(opts) - local options = vim.tbl_deep_extend("force", DEFAULT_CONFIG, opts.view or {}) + local options = opts.view or {} M.View.side = options.side M.View.width = options.width M.View.height = options.height From fb5ba22120bdd3e32d0614b8c855529952ec538b Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 13:55:15 +1100 Subject: [PATCH 4/9] #1050 add trash option defaults to DEFAULT_OPTS --- README.md | 4 ++++ doc/nvim-tree-lua.txt | 4 ++++ lua/nvim-tree.lua | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 5cea7ee2711..b3bdd78f62d 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,10 @@ require'nvim-tree'.setup { }, }, }, + trash = { + cmd = "trash", + require_confirm = true, + }, log = { enable = false, types = { diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 074823817d3..ec2ee310cc7 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -152,6 +152,10 @@ function. }, }, }, + trash = { + cmd = "trash", + require_confirm = true, + }, log = { enable = false, types = { diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index e71489c1c80..eccc9b39e79 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -402,6 +402,10 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS }, }, }, + trash = { + cmd = "trash", + require_confirm = true, + }, log = { enable = false, types = { From 34ab03815c2c0e3a94f23f468b109df36b43517f Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 14:05:02 +1100 Subject: [PATCH 5/9] #1050 move window picker option defaults to DEFAULT_OPTS --- lua/nvim-tree.lua | 5 +++++ lua/nvim-tree/actions/open-file.lua | 15 ++------------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index eccc9b39e79..991a5b4be2e 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -399,6 +399,11 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS resize_window = false, window_picker = { enable = true, + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, }, }, }, diff --git a/lua/nvim-tree/actions/open-file.lua b/lua/nvim-tree/actions/open-file.lua index 02d9883b314..bb1478ca315 100644 --- a/lua/nvim-tree/actions/open-file.lua +++ b/lua/nvim-tree/actions/open-file.lua @@ -4,18 +4,7 @@ local lib = require "nvim-tree.lib" local utils = require "nvim-tree.utils" local view = require "nvim-tree.view" -local M = { - quit_on_open = false, - resize_window = false, - window_picker = { - enable = true, - chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", - exclude = { - filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, - buftype = { "nofile", "terminal", "help" }, - }, - }, -} +local M = {} local function get_split_cmd() local side = view.View.side @@ -235,7 +224,7 @@ function M.setup(opts) if opts.actions.open_file.window_picker.chars then opts.actions.open_file.window_picker.chars = tostring(opts.actions.open_file.window_picker.chars):upper() end - M.window_picker = vim.tbl_extend("force", M.window_picker, opts.actions.open_file.window_picker) + M.window_picker = opts.actions.open_file.window_picker end return M From 59c0444d099859fe678c4a2602690bf40ca58a2c Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 14:06:16 +1100 Subject: [PATCH 6/9] #1050 move window picker option defaults to DEFAULT_OPTS --- README.md | 5 +++++ doc/nvim-tree-lua.txt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index b3bdd78f62d..bb0c5954c07 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,11 @@ require'nvim-tree'.setup { resize_window = false, window_picker = { enable = true, + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, }, }, }, diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index ec2ee310cc7..d5340dd35db 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -149,6 +149,11 @@ function. resize_window = false, window_picker = { enable = true, + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, }, }, }, From fe593174b921ac4ce0443c6a3f76f8bad80874db Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 14:12:57 +1100 Subject: [PATCH 7/9] #1050 add mapping defaults to DEFAULT_OPTS --- README.md | 4 ++++ doc/nvim-tree-lua.txt | 4 ++++ lua/nvim-tree.lua | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index bb0c5954c07..45889982790 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,10 @@ require'nvim-tree'.setup { number = false, relativenumber = false, signcolumn = "yes", + mappings = { + custom_only = false, + list = {}, + }, }, hijack_directories = { enable = true, diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index d5340dd35db..5d95d410389 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -104,6 +104,10 @@ function. number = false, relativenumber = false, signcolumn = "yes", + mappings = { + custom_only = false, + list = {}, + }, }, hijack_directories = { enable = true, diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 991a5b4be2e..d3c195ac788 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -354,6 +354,10 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS number = false, relativenumber = false, signcolumn = "yes", + mappings = { + custom_only = false, + list = {}, + }, }, hijack_directories = { enable = true, From ac503b35584436f9805dd3f22cbe09174f920a8f Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 14:23:33 +1100 Subject: [PATCH 8/9] #1050 add empty setup option for new users --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 45889982790..5173dccface 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,13 @@ highlight NvimTreeFolderIcon guibg=blue ```lua -- init.lua --- following options are the default +-- empty setup using defaults: add your own 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 { [//]: <> (BEGIN_DEFAULT_OPTS) From 27e4b7449ba2a1fd2e0d86f8a1d750bd77cafd14 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 12 Mar 2022 14:38:09 +1100 Subject: [PATCH 9/9] #1050 add note: where to put user mappings --- README.md | 4 +++- doc/nvim-tree-lua.txt | 4 +++- lua/nvim-tree.lua | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5173dccface..54b737b97ad 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,9 @@ require'nvim-tree'.setup { signcolumn = "yes", mappings = { custom_only = false, - list = {}, + list = { + -- user mappings go here + }, }, }, hijack_directories = { diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 5d95d410389..8be767b738c 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -106,7 +106,9 @@ function. signcolumn = "yes", mappings = { custom_only = false, - list = {}, + list = { + -- user mappings go here + }, }, }, hijack_directories = { diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index d3c195ac788..77e54fddb35 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -356,7 +356,9 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS signcolumn = "yes", mappings = { custom_only = false, - list = {}, + list = { + -- user mappings go here + }, }, }, hijack_directories = {