16 lines
330 B
Lua
16 lines
330 B
Lua
local setup, nvimtree = pcall(require, "nvim-tree")
|
|
if not setup then
|
|
return
|
|
end
|
|
|
|
nvimtree.setup({
|
|
view = {
|
|
width = 30,
|
|
}
|
|
})
|
|
-- hacky keybinding to change root dir
|
|
vim.keymap.set("n", "<leader>tr", function ()
|
|
require("nvim-tree.api").tree.change_root(vim.fn.getcwd())
|
|
end, {desc = "Change root dir to current dir"}
|
|
)
|