G migration mechanism (#1030)

This commit is contained in:
Alexander Courtis
2022-03-02 05:54:12 +11:00
committed by GitHub
parent 3d8912ca53
commit 97717d8d23
5 changed files with 244 additions and 43 deletions

View File

@@ -7,6 +7,7 @@ local renderer = require'nvim-tree.renderer'
local view = require'nvim-tree.view'
local utils = require'nvim-tree.utils'
local change_dir = require'nvim-tree.actions.change-dir'
local legacy = require'nvim-tree.legacy'
local _config = {}
@@ -348,7 +349,7 @@ local DEFAULT_OPTS = {
},
filters = {
dotfiles = false,
custom_filter = {},
custom = {},
exclude = {}
},
git = {
@@ -364,9 +365,7 @@ local DEFAULT_OPTS = {
open_file = {
quit_on_open = vim.g.nvim_tree_quit_on_open == 1,
window_picker = {
enable = vim.g.nvim_tree_disable_window_picker ~= 1,
chars = vim.g.nvim_tree_window_picker_chars,
exclude = vim.g.nvim_tree_window_picker_exclude,
enable = true,
}
}
},
@@ -381,6 +380,8 @@ local function merge_options(conf)
end
function M.setup(conf)
legacy.migrate_legacy_options(conf)
local opts = merge_options(conf)
local netrw_disabled = opts.disable_netrw or opts.hijack_netrw