diff options
| author | srdusr <trevorgray@srdusr.com> | 2022-12-16 23:42:45 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2022-12-16 23:42:45 +0200 |
| commit | af5e62f47fc0c49ff3fb7c4dcf26a438471cf7cf (patch) | |
| tree | d80cae9fd509089a3472aaf355b598fdca1b4f6f /.config/nvim/lua/plugins/nvim-tree.lua | |
| parent | 6371e90cc598e52b1d057d4b6d9a7b75d60e2fd0 (diff) | |
| parent | 18e3249ba8bfea656b02308225684e893d0273fa (diff) | |
| download | dotfiles-af5e62f47fc0c49ff3fb7c4dcf26a438471cf7cf.tar.gz dotfiles-af5e62f47fc0c49ff3fb7c4dcf26a438471cf7cf.zip | |
Merge commit 'af4baf569778ef8324ec0c1c6c0f09d6fb79e6a4' as '.config/nvim'
Diffstat (limited to '.config/nvim/lua/plugins/nvim-tree.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/nvim-tree.lua | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..a1e10e0 --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -0,0 +1,69 @@ +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({ + update_focused_file = { + enable = true, + update_cwd = true, + }, + renderer = { + root_folder_modifier = ":t", + icons = { + 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") }, + { key = "u", action = "dir_up" }, + }, + }, + }, +}) |
