local M = {} function M.lua_add() vim.keymap.set('n', '', "NvimTreeToggle", {}) vim.keymap.set('n', 't', "NvimTreeFindFile", {}) end function M.lua_source() require("nvim-tree").setup { git = { ignore = false, -- .gitignoreされたファイルもtreeに表示する }, -- 以下、treeのrootに関する設定 -- prefer_startup_root = true, sync_root_with_cwd = true, -- `:cd`, `:tcd`と同期 update_focused_file = { enable = false, -- カレントバッファに合わせて常に更新 update_root = true, -- `:NvimTreeFindFile`すると更新 ignore_list = {}, }, view = { -- sizeを動的に調整する width = { min = 5, max = 75, padding = 1 } }, } end return M