update nvimtree config and highlights

This commit is contained in:
siduck76 2021-07-01 11:55:38 +05:30
parent 2d4172fd98
commit 9b2d36b767
3 changed files with 55 additions and 44 deletions

View file

@ -72,10 +72,12 @@ fg("NvimTreeEmptyFolderName", blue)
fg("NvimTreeIndentMarker", one_bg2) fg("NvimTreeIndentMarker", one_bg2)
fg("NvimTreeVertSplit", darker_black) fg("NvimTreeVertSplit", darker_black)
bg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black)
fg("NvimTreeEndOfBuffer", darker_black)
fg("NvimTreeRootFolder", darker_black) fg("NvimTreeRootFolder", darker_black)
bg("NvimTreeNormal", darker_black) bg("NvimTreeNormal", darker_black)
fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
fg_bg("NvimTreeWindowPicker", red, black2)
-- telescope -- telescope
fg("TelescopeBorder", line) fg("TelescopeBorder", line)

View file

@ -8,23 +8,30 @@ M.config = function()
g.nvim_tree_side = "left" g.nvim_tree_side = "left"
g.nvim_tree_width = 25 g.nvim_tree_width = 25
g.nvim_tree_ignore = {".git", "node_modules", ".cache"} g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
g.nvim_tree_gitignore = 1
g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes.
g.nvim_tree_auto_open = 0 g.nvim_tree_auto_open = 0
g.nvim_tree_auto_close = 0 g.nvim_tree_auto_close = 0 -- closes tree when it's the last window
g.nvim_tree_quit_on_open = 0 g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened
g.nvim_tree_follow = 1 g.nvim_tree_follow = 1
g.nvim_tree_indent_markers = 1 g.nvim_tree_indent_markers = 1
g.nvim_tree_hide_dotfiles = 1 g.nvim_tree_hide_dotfiles = 1
g.nvim_tree_git_hl = 1 g.nvim_tree_git_hl = 1
g.nvim_tree_highlight_opened_files = 0
g.nvim_tree_root_folder_modifier = ":t" g.nvim_tree_root_folder_modifier = ":t"
g.nvim_tree_tab_open = 0 g.nvim_tree_tab_open = 0
g.nvim_tree_allow_resize = 1 g.nvim_tree_allow_resize = 1
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
g.nvim_tree_disable_netrw = 1
g.nvim_tree_hijack_netrw = 0
g.nvim_tree_update_cwd = 1
g.nvim_tree_show_icons = { g.nvim_tree_show_icons = {
git = 1, git = 1,
folders = 1, folders = 1,
files = 1 files = 1
-- folder_arrows= 1
} }
g.nvim_tree_icons = { g.nvim_tree_icons = {
default = "", default = "",
symlink = "", symlink = "",
@ -38,50 +45,52 @@ M.config = function()
ignored = "" ignored = ""
}, },
folder = { folder = {
-- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below!
-- arrow_open = "",
-- arrow_closed = "",
default = "", default = "",
open = "", open = "",
symlink = "", empty = "", -- 
empty = "",
empty_open = "", empty_open = "",
symlink_open = "" symlink = "",
symlink_open = ""
} }
} }
local tree_cb = require "nvim-tree.config".nvim_tree_callback local tree_cb = require "nvim-tree.config".nvim_tree_callback
g.nvim_tree_bindings = { g.nvim_tree_bindings = {
["u"] = ":lua require'some_module'.some_function()<cr>", {key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
-- default mappings {key = {"<2-RightMouse>", "<C-}>"}, cb = tree_cb("cd")},
["<CR>"] = tree_cb("edit"), {key = "<C-v>", cb = tree_cb("vsplit")},
["o"] = tree_cb("edit"), {key = "<C-x>", cb = tree_cb("split")},
["<2-LeftMouse>"] = tree_cb("edit"), {key = "<C-t>", cb = tree_cb("tabnew")},
["<2-RightMouse>"] = tree_cb("cd"), {key = "<", cb = tree_cb("prev_sibling")},
["<C-]>"] = tree_cb("cd"), {key = ">", cb = tree_cb("next_sibling")},
["<C-v>"] = tree_cb("vsplit"), {key = "P", cb = tree_cb("parent_node")},
["<C-x>"] = tree_cb("split"), {key = "<BS>", cb = tree_cb("close_node")},
["<C-t>"] = tree_cb("tabnew"), {key = "<S-CR>", cb = tree_cb("close_node")},
["<"] = tree_cb("prev_sibling"), {key = "<Tab>", cb = tree_cb("preview")},
[">"] = tree_cb("next_sibling"), {key = "K", cb = tree_cb("first_sibling")},
["<BS>"] = tree_cb("close_node"), {key = "J", cb = tree_cb("last_sibling")},
["<S-CR>"] = tree_cb("close_node"), {key = "I", cb = tree_cb("toggle_ignored")},
["<Tab>"] = tree_cb("preview"), {key = "H", cb = tree_cb("toggle_dotfiles")},
["I"] = tree_cb("toggle_ignored"), {key = "R", cb = tree_cb("refresh")},
["H"] = tree_cb("toggle_dotfiles"), {key = "a", cb = tree_cb("create")},
["R"] = tree_cb("refresh"), {key = "d", cb = tree_cb("remove")},
["a"] = tree_cb("create"), {key = "r", cb = tree_cb("rename")},
["d"] = tree_cb("remove"), {key = "<C->", cb = tree_cb("full_rename")},
["r"] = tree_cb("rename"), {key = "x", cb = tree_cb("cut")},
["<C-r>"] = tree_cb("full_rename"), {key = "c", cb = tree_cb("copy")},
["x"] = tree_cb("cut"), {key = "p", cb = tree_cb("paste")},
["c"] = tree_cb("copy"), {key = "y", cb = tree_cb("copy_name")},
["p"] = tree_cb("paste"), {key = "Y", cb = tree_cb("copy_path")},
["y"] = tree_cb("copy_name"), {key = "gy", cb = tree_cb("copy_absolute_path")},
["Y"] = tree_cb("copy_path"), {key = "[c", cb = tree_cb("prev_git_item")},
["gy"] = tree_cb("copy_absolute_path"), {key = "}c", cb = tree_cb("next_git_item")},
["[c"] = tree_cb("prev_git_item"), {key = "-", cb = tree_cb("dir_up")},
["]c"] = tree_cb("next_git_item"), {key = "q", cb = tree_cb("close")},
["-"] = tree_cb("dir_up"), {key = "g?", cb = tree_cb("toggle_help")}
["q"] = tree_cb("close")
} }
end end

View file

@ -128,9 +128,9 @@ gls.right[2] = {
return "" return ""
end, end,
condition = require("galaxyline.condition").check_git_workspace, condition = require("galaxyline.condition").check_git_workspace,
highlight = {colors.grey_fg2, colors.lightbg}, highlight = {colors.grey_fg2, colors.statusline_bg},
separator = "", separator = " ",
separator_highlight = {colors.lightbg, colors.statusline_bg} separator_highlight = {colors.statusline_bg, colors.statusline_bg}
} }
} }
@ -138,7 +138,7 @@ gls.right[3] = {
GitBranch = { GitBranch = {
provider = "GitBranch", provider = "GitBranch",
condition = require("galaxyline.condition").check_git_workspace, condition = require("galaxyline.condition").check_git_workspace,
highlight = {colors.grey_fg2, colors.lightbg} highlight = {colors.grey_fg2, colors.statusline_bg}
} }
} }
@ -149,7 +149,7 @@ gls.right[4] = {
end, end,
highlight = {colors.statusline_bg, colors.red}, highlight = {colors.statusline_bg, colors.red},
separator = "", separator = "",
separator_highlight = {colors.red, colors.lightbg} separator_highlight = {colors.red, colors.statusline_bg}
} }
} }