mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
Rewrite init.vim to init.lua
This commit is contained in:
81
.config/nvim/lua/user/nvim-tree.lua
Normal file
81
.config/nvim/lua/user/nvim-tree.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
local status_ok, nvim_tree = pcall(require, 'nvim-tree')
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local config_status_ok, nvim_tree_config = pcall(require, 'nvim-tree.config')
|
||||
if not config_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local tree_cb = nvim_tree_config.nvim_tree_callback
|
||||
|
||||
|
||||
nvim_tree.setup {
|
||||
sort_by = 'case_sensitive',
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
root_folder_modifier = ':t',
|
||||
icons = {
|
||||
webdev_colors = true,
|
||||
show = {
|
||||
file = true,
|
||||
folder = true,
|
||||
folder_arrow = true,
|
||||
git = true,
|
||||
},
|
||||
glyphs = {
|
||||
default = '',
|
||||
symlink = '',
|
||||
folder = {
|
||||
arrow_open = '',
|
||||
arrow_closed = '',
|
||||
default = '',
|
||||
open = '',
|
||||
empty = '',
|
||||
empty_open = '',
|
||||
symlink = '',
|
||||
symlink_open = '',
|
||||
},
|
||||
git = {
|
||||
unstaged = '',
|
||||
staged = 'S',
|
||||
unmerged = '',
|
||||
renamed = '➜',
|
||||
untracked = 'U',
|
||||
deleted = '',
|
||||
ignored = '◌',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
icons = {
|
||||
hint = '',
|
||||
info = '',
|
||||
warning = '',
|
||||
error = '',
|
||||
},
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
height = 30,
|
||||
side = 'left',
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = { 'l', '<CR>', 'o' }, cb = tree_cb 'edit' },
|
||||
{ key = 'h', cb = tree_cb 'close_node' },
|
||||
{ key = 'v', cb = tree_cb 'vsplit' },
|
||||
},
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user