fix: renderer global options should be loaded on each reload

This commit is contained in:
kiyan
2021-09-27 19:43:23 +02:00
parent 67f1d36d1b
commit 1b746744ad

View File

@@ -249,16 +249,15 @@ local picture = {
gif = true, gif = true,
} }
local special = vim.g.nvim_tree_special_files or {
["Cargo.toml"] = true,
Makefile = true,
["README.md"] = true,
["readme.md"] = true,
}
local root_folder_modifier = vim.g.nvim_tree_root_folder_modifier or ':~'
local function update_draw_data(tree, depth, markers) local function update_draw_data(tree, depth, markers)
local root_folder_modifier = vim.g.nvim_tree_root_folder_modifier or ':~'
local special = vim.g.nvim_tree_special_files or {
["Cargo.toml"] = true,
Makefile = true,
["README.md"] = true,
["readme.md"] = true,
}
if tree.cwd and tree.cwd ~= '/' then if tree.cwd and tree.cwd ~= '/' then
local root_name = utils.path_join({ local root_name = utils.path_join({
utils.path_remove_trailing(vim.fn.fnamemodify(tree.cwd, root_folder_modifier)), utils.path_remove_trailing(vim.fn.fnamemodify(tree.cwd, root_folder_modifier)),