Skip to content

Commit

Permalink
tree floating window
Browse files Browse the repository at this point in the history
  • Loading branch information
shnaky committed Feb 22, 2023
1 parent d58325c commit ca6eb4e
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions nvim/lua/ori/plugins/tree.lua
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
-- import settings file with protected call
local setup, nvimtree = pcall(require, "nvim-tree")
if not setup then
return
return
end


-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- vim.g.nvim_tree_auto_close = true

-- set termguicolors to enable highlight groups
vim.opt.termguicolors = true

-- empty setup using defaults
-- require("nvim-tree").setup()
nvimtree.setup()

-- OR setup with some options
-- require("nvim-tree").setup({
-- sort_by = "case_sensitive",
-- view = {
-- width = 30,
-- mappings = {
-- list = {
-- { key = "u", action = "dir_up" },
-- },
-- },
-- },
-- renderer = {
-- group_empty = true,
-- },
-- filters = {
-- dotfiles = true,
-- },
-- })
-- tree config setup
nvimtree.setup({
-- windows / buffer setup
view = {
-- floating window
float = {
enable = true,
quit_on_focus_loss = true, -- close tree when out of focus
},
},
renderer = {
group_empty = true, -- empty folders shown as one
},
})

0 comments on commit ca6eb4e

Please sign in to comment.