update nvimtree options

This commit is contained in:
Jidbo 2023-11-01 19:38:39 +01:00 committed by Saibotk
parent 1a24c00a4f
commit a22350c4f7
Signed by: saibotk
GPG key ID: 67585F0065E261D5

View file

@ -1,24 +1,24 @@
-- NVIM TREE setup
-- colors
vim.cmd [[hi Directory guifg=#D1D5DB ctermfg=blue]]
vim.cmd [[hi NvimTreeFolderIcon guifg=#4B5563]]
vim.cmd [[hi NvimTreeRootFolder guifg=#9CA3AF]]
vim.cmd [[hi NvimTreeIndentMarker guifg=#9CA3AF]]
vim.cmd [[hi NvimTreeExecFile guifg=#DC2626]]
vim.cmd [[hi NvimTreeGitDirty guifg=#FB923C]]
vim.cmd [[hi NvimTreeGitStaged guifg=#DC2626]]
vim.cmd [[hi NvimTreeGitNew guifg=#DC2626]]
vim.cmd [[hi NvimTreeGitDeleted guifg=#DC2626]]
vim.cmd [[hi NvimTreeSpecialFile guifg=#F8FAFC ]]
vim.cmd [[hi NvimTreeFolderName guifg=#D1D5DB ]]
vim.cmd [[hi NvimTreeOpenedFolderName guifg=#D1D5DB ]]
vim.cmd [[hi NvimTreeEmptyFolderName guifg=#D1D5DB ]]
vim.cmd([[hi Directory guifg=#D1D5DB ctermfg=blue]])
vim.cmd([[hi NvimTreeFolderIcon guifg=#4B5563]])
vim.cmd([[hi NvimTreeRootFolder guifg=#9CA3AF]])
vim.cmd([[hi NvimTreeIndentMarker guifg=#9CA3AF]])
vim.cmd([[hi NvimTreeExecFile guifg=#DC2626]])
vim.cmd([[hi NvimTreeGitDirty guifg=#FB923C]])
vim.cmd([[hi NvimTreeGitStaged guifg=#DC2626]])
vim.cmd([[hi NvimTreeGitNew guifg=#DC2626]])
vim.cmd([[hi NvimTreeGitDeleted guifg=#DC2626]])
vim.cmd([[hi NvimTreeSpecialFile guifg=#F8FAFC ]])
vim.cmd([[hi NvimTreeFolderName guifg=#D1D5DB ]])
vim.cmd([[hi NvimTreeOpenedFolderName guifg=#D1D5DB ]])
vim.cmd([[hi NvimTreeEmptyFolderName guifg=#D1D5DB ]])
-- setup
local nvimtree = require'nvim-tree'
local nvimtree = require("nvim-tree")
nvimtree.setup {
nvimtree.setup({
update_cwd = true,
renderer = {
add_trailing = false,
@ -32,29 +32,22 @@ nvimtree.setup {
auto_open = true,
},
system_open = {
cmd = 'open'
cmd = "open",
},
filters = {
dotfiles = true
dotfiles = true,
},
git = {
enable = true,
ignore = false,
timeout = 500,
},
view = {
mappings = {
custom_only = false,
list = {}
},
},
trash = {
cmd = 'trash'
}
}
cmd = "trash",
},
})
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
-- KEYMAPS
local api = require("nvim-tree.api")
vim.keymap.set('n', '<leader>e', api.tree.toggle)
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>")