summaryrefslogtreecommitdiff
path: root/lua/config/nvim-tree.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-22 16:44:32 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-22 16:44:32 +0100
commit7a60f2d61c44cdba85cbcf10b561b0401e9b105a (patch)
tree0f92b1e21f84c907bcd1c373625960d2834dc326 /lua/config/nvim-tree.lua
parentc22beb43a4526372abbd6c3dab48051e6b4e2a20 (diff)
fix: format with stylua config
Diffstat (limited to 'lua/config/nvim-tree.lua')
-rw-r--r--lua/config/nvim-tree.lua170
1 files changed, 85 insertions, 85 deletions
diff --git a/lua/config/nvim-tree.lua b/lua/config/nvim-tree.lua
index c48a8e4..68ee87b 100644
--- a/lua/config/nvim-tree.lua
+++ b/lua/config/nvim-tree.lua
@@ -1,100 +1,100 @@
-- A file explorer.
vim.g.nvim_tree_icons = {
- default = "",
- symlink = "",
- git = {
- unstaged = "",
- staged = "S",
- unmerged = "",
- renamed = "➜",
- deleted = "",
- untracked = "U",
- ignored = "◌",
- },
- folder = {
- default = "",
- open = "",
- empty = "",
- empty_open = "",
- symlink = "",
- },
+ default = "",
+ symlink = "",
+ git = {
+ unstaged = "",
+ staged = "S",
+ unmerged = "",
+ renamed = "➜",
+ deleted = "",
+ untracked = "U",
+ ignored = "◌",
+ },
+ folder = {
+ default = "",
+ open = "",
+ empty = "",
+ empty_open = "",
+ symlink = "",
+ },
}
local status_ok, nvim_tree = pcall(require, "nvim-tree")
if not status_ok then
- return
+ return
end
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
if not config_status_ok then
- return
+ return
end
local tree_cb = nvim_tree_config.nvim_tree_callback
-nvim_tree.setup({
- disable_netrw = true,
- hijack_netrw = true,
- open_on_setup = false,
- ignore_ft_on_setup = {
- "startify",
- "dashboard",
- "alpha",
- },
- auto_close = true,
- open_on_tab = false,
- hijack_cursor = false,
- update_cwd = true,
- update_to_buf_dir = {
- enable = true,
- auto_open = true,
- },
- diagnostics = {
- enable = true,
- icons = {
- hint = "",
- info = "",
- warning = "",
- error = "",
- },
- },
- update_focused_file = {
- enable = true,
- update_cwd = true,
- ignore_list = {},
- },
- git = {
- enable = true,
- ignore = true,
- timeout = 500,
- },
- view = {
- width = 30,
- height = 30,
- hide_root_folder = false,
- side = "left",
- auto_resize = true,
- mappings = {
- custom_only = false,
- list = {
- { key = { "l", "<CR>", "o" }, cb = tree_cb("edit") },
- { key = "h", cb = tree_cb("close_node") },
- { key = "v", cb = tree_cb("vsplit") },
- },
- },
- number = false,
- relativenumber = false,
- },
- quit_on_open = 0,
- git_hl = 1,
- disable_window_picker = 0,
- root_folder_modifier = ":t",
- show_icons = {
- git = 1,
- folders = 1,
- files = 1,
- folder_arrows = 1,
- tree_width = 30,
- },
-})
+nvim_tree.setup {
+ disable_netrw = true,
+ hijack_netrw = true,
+ open_on_setup = false,
+ ignore_ft_on_setup = {
+ "startify",
+ "dashboard",
+ "alpha",
+ },
+ auto_close = true,
+ open_on_tab = false,
+ hijack_cursor = false,
+ update_cwd = true,
+ update_to_buf_dir = {
+ enable = true,
+ auto_open = true,
+ },
+ diagnostics = {
+ enable = true,
+ icons = {
+ hint = "",
+ info = "",
+ warning = "",
+ error = "",
+ },
+ },
+ update_focused_file = {
+ enable = true,
+ update_cwd = true,
+ ignore_list = {},
+ },
+ git = {
+ enable = true,
+ ignore = true,
+ timeout = 500,
+ },
+ view = {
+ width = 30,
+ height = 30,
+ hide_root_folder = false,
+ side = "left",
+ auto_resize = true,
+ mappings = {
+ custom_only = false,
+ list = {
+ { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
+ { key = "h", cb = tree_cb "close_node" },
+ { key = "v", cb = tree_cb "vsplit" },
+ },
+ },
+ number = false,
+ relativenumber = false,
+ },
+ quit_on_open = 0,
+ git_hl = 1,
+ disable_window_picker = 0,
+ root_folder_modifier = ":t",
+ show_icons = {
+ git = 1,
+ folders = 1,
+ files = 1,
+ folder_arrows = 1,
+ tree_width = 30,
+ },
+}