.dotfiles/nvim/lua/filemanager.lua

90 lines
1.9 KiB
Lua
Raw Normal View History

2022-01-24 00:49:38 +01:00
-- NVIM TREE setup
-- icons
vim.g.nvim_tree_icons = {
default = '',
symlink = '',
git = {
unstaged = '',
staged = '',
unmerged = '',
renamed = '',
untracked = '',
deleted = '',
2022-01-24 00:49:38 +01:00
},
folder = {
default = '',
open = '',
empty = '',
empty_open = '',
symlink = '',
symlink_open = '',
2022-01-24 00:49:38 +01:00
},
}
-- extra options
vim.g.nvim_tree_add_trailing=1
vim.g.nvim_tree_special_files= {
["README.md"] = true,
["readme.md"] = true,
2022-01-24 00:49:38 +01:00
Pipfile = true,
Makefile = true,
['package.json'] = true,
2022-01-24 00:49:38 +01:00
}
-- 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 ]]
2022-01-24 18:56:10 +01:00
vim.cmd [[hi NvimTreeFolderName guifg=#D1D5DB ]]
vim.cmd [[hi NvimTreeOpenedFolderName guifg=#D1D5DB ]]
vim.cmd [[hi NvimTreeEmptyFolderName guifg=#D1D5DB ]]
2022-01-24 00:49:38 +01:00
-- setup
local nvimtree = require'nvim-tree'
nvimtree.setup {
update_cwd = true,
renderer = {
indent_markers = {
enable = true,
},
},
2022-01-24 00:49:38 +01:00
update_to_buf_dir = {
enable = true,
auto_open = true,
},
system_open = {
cmd = 'open'
2022-01-24 00:49:38 +01:00
},
filters = {
dotfiles = true
},
git = {
enable = true,
2022-01-24 18:56:10 +01:00
ignore = false,
2022-01-24 00:49:38 +01:00
timeout = 500,
},
view = {
mappings = {
custom_only = false,
list = {}
},
},
trash = {
cmd = 'trash'
2022-01-24 00:49:38 +01:00
}
}
2022-04-13 21:45:29 +02:00
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
-- KEYMAPS
vim.keymap.set('n', '<leader>e', nvimtree.toggle)