Skip to content

Commit

Permalink
Version: 0.61.0 - Update nvim-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
brainfucksec committed May 28, 2022
1 parent aa14e88 commit 7c126ec
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 29 deletions.
2 changes: 1 addition & 1 deletion nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--[[
Neovim init file
Version: 0.60.1 - 2022/05/18
Version: 0.61.0 - 2022/05/28
Maintainer: brainf+ck
Website: https://github.com/brainfucksec/neovim-lua
Expand Down
164 changes: 136 additions & 28 deletions nvim/lua/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,50 @@
-- Keybindings are defined in `core/keymaps.lua`:
-- https://github.com/kyazdani42/nvim-tree.lua#keybindings

-- Note: options under the g: command should be set BEFORE running the
-- setup function: https://github.com/kyazdani42/nvim-tree.lua#setup
-- Default options ARE NOT included.
-- See: `:help NvimTree`


-- Global options
local g = vim.g

g.nvim_tree_highlight_opened_files = 1
g.nvim_tree_git_hl = 1
g.nvim_tree_respect_buf_cwd = 1
g.nvim_tree_width_allow_resize = 1
g.nvim_tree_icons = { default = "" }
g.nvim_tree_show_icons = {
git = 1,
folders = 1,
files = 1,
}

local status_ok, nvim_tree = pcall(require, 'nvim-tree')
if not status_ok then
return
end

-- Call setup:
--- Each of these are documented in `:help nvim-tree.OPTION_NAME`
-- Each of these are documented in `:help nvim-tree.OPTION_NAME`
-- nested options are documented by accessing them with `.` (eg: `:help nvim-tree.view.mappings.list`)
nvim_tree.setup {
auto_reload_on_write = true,
create_in_closed_folder = false,
--disable_netrw = false, -> already disabled on `/core/options.lua`
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
ignore_buffer_on_setup = false,
open_on_setup = true,
open_on_setup_file = false, --default
open_on_setup_file = false,
open_on_tab = true,
sort_by = "name",
reload_on_bufenter = false,
respect_buf_cwd = false,
update_cwd = true,
view = { width = 32 },
view = {
width = 32,
height = 30,
hide_root_folder = false,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
},
renderer = {
add_trailing = false,
group_empty = false,
highlight_git = false,
highlight_opened_files = "none",
root_folder_modifier = ":~",
indent_markers = {
enable = false,
icons = {
Expand All @@ -50,17 +60,115 @@ nvim_tree.setup {
none = " ",
},
},
icons = {
webdev_colors = true,
git_placement = "before",
padding = " ",
symlink_arrow = "",
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "",
symlink = "",
folder = {
arrow_closed = "",
arrow_open = "",
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
},
git = {
unstaged = "",
staged = "",
unmerged = "",
renamed = "",
untracked = "",
deleted = "",
ignored = "",
},
},
},
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
},
actions = {
change_dir = { enable = false },
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = true,
update_cwd = true,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = false,
show_on_dirs = false,
icons = {
hint = "",
info = "",
warning = "",
error = "",
},
},
filters = {
dotfiles = true,
custom = { 'node_modules', '.cache', '.bin' },
dotfiles = false,
custom = {},
exclude = {},
},
git = {
enable = true,
ignore = true,
timeout = 400,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
open_file = {
quit_on_open = false,
resize_window = true,
window_picker = {
enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
},
trash = {
cmd = "trash",
require_confirm = true,
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
diagnostics = false,
git = false,
profile = false,
},
},
}

0 comments on commit 7c126ec

Please sign in to comment.