update nvimtree options
This commit is contained in:
parent
1a24c00a4f
commit
a22350c4f7
1 changed files with 43 additions and 50 deletions
|
@ -1,60 +1,53 @@
|
||||||
-- NVIM TREE setup
|
-- NVIM TREE setup
|
||||||
|
|
||||||
-- colors
|
-- colors
|
||||||
vim.cmd [[hi Directory guifg=#D1D5DB ctermfg=blue]]
|
vim.cmd([[hi Directory guifg=#D1D5DB ctermfg=blue]])
|
||||||
vim.cmd [[hi NvimTreeFolderIcon guifg=#4B5563]]
|
vim.cmd([[hi NvimTreeFolderIcon guifg=#4B5563]])
|
||||||
vim.cmd [[hi NvimTreeRootFolder guifg=#9CA3AF]]
|
vim.cmd([[hi NvimTreeRootFolder guifg=#9CA3AF]])
|
||||||
vim.cmd [[hi NvimTreeIndentMarker guifg=#9CA3AF]]
|
vim.cmd([[hi NvimTreeIndentMarker guifg=#9CA3AF]])
|
||||||
vim.cmd [[hi NvimTreeExecFile guifg=#DC2626]]
|
vim.cmd([[hi NvimTreeExecFile guifg=#DC2626]])
|
||||||
vim.cmd [[hi NvimTreeGitDirty guifg=#FB923C]]
|
vim.cmd([[hi NvimTreeGitDirty guifg=#FB923C]])
|
||||||
vim.cmd [[hi NvimTreeGitStaged guifg=#DC2626]]
|
vim.cmd([[hi NvimTreeGitStaged guifg=#DC2626]])
|
||||||
vim.cmd [[hi NvimTreeGitNew guifg=#DC2626]]
|
vim.cmd([[hi NvimTreeGitNew guifg=#DC2626]])
|
||||||
vim.cmd [[hi NvimTreeGitDeleted guifg=#DC2626]]
|
vim.cmd([[hi NvimTreeGitDeleted guifg=#DC2626]])
|
||||||
vim.cmd [[hi NvimTreeSpecialFile guifg=#F8FAFC ]]
|
vim.cmd([[hi NvimTreeSpecialFile guifg=#F8FAFC ]])
|
||||||
vim.cmd [[hi NvimTreeFolderName guifg=#D1D5DB ]]
|
vim.cmd([[hi NvimTreeFolderName guifg=#D1D5DB ]])
|
||||||
vim.cmd [[hi NvimTreeOpenedFolderName guifg=#D1D5DB ]]
|
vim.cmd([[hi NvimTreeOpenedFolderName guifg=#D1D5DB ]])
|
||||||
vim.cmd [[hi NvimTreeEmptyFolderName guifg=#D1D5DB ]]
|
vim.cmd([[hi NvimTreeEmptyFolderName guifg=#D1D5DB ]])
|
||||||
|
|
||||||
-- setup
|
-- setup
|
||||||
local nvimtree = require'nvim-tree'
|
local nvimtree = require("nvim-tree")
|
||||||
|
|
||||||
nvimtree.setup {
|
nvimtree.setup({
|
||||||
update_cwd = true,
|
update_cwd = true,
|
||||||
renderer = {
|
renderer = {
|
||||||
add_trailing = false,
|
add_trailing = false,
|
||||||
special_files = {"README.md", "readme.md", "Pipfile", "Makefile", "package.json"},
|
special_files = { "README.md", "readme.md", "Pipfile", "Makefile", "package.json" },
|
||||||
indent_markers = {
|
indent_markers = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
hijack_directories = {
|
hijack_directories = {
|
||||||
enable = true,
|
enable = true,
|
||||||
auto_open = true,
|
auto_open = true,
|
||||||
},
|
},
|
||||||
system_open = {
|
system_open = {
|
||||||
cmd = 'open'
|
cmd = "open",
|
||||||
},
|
},
|
||||||
filters = {
|
filters = {
|
||||||
dotfiles = true
|
dotfiles = true,
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
enable = true,
|
enable = true,
|
||||||
ignore = false,
|
ignore = false,
|
||||||
timeout = 500,
|
timeout = 500,
|
||||||
},
|
},
|
||||||
view = {
|
trash = {
|
||||||
mappings = {
|
cmd = "trash",
|
||||||
custom_only = false,
|
},
|
||||||
list = {}
|
})
|
||||||
},
|
|
||||||
},
|
|
||||||
trash = {
|
|
||||||
cmd = 'trash'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
|
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
|
||||||
|
|
||||||
-- KEYMAPS
|
-- KEYMAPS
|
||||||
local api = require("nvim-tree.api")
|
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>")
|
||||||
vim.keymap.set('n', '<leader>e', api.tree.toggle)
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue