swapped neotree with nvimtree

This commit is contained in:
Sven Vogel 2024-03-28 00:32:16 +01:00
parent ba78758b9a
commit 44f3b93498
4 changed files with 53 additions and 87 deletions

View File

@ -54,7 +54,7 @@ return {
{ 'n' }, '<C-w><Right>', '<cmd>wincmd l<CR>', { desc = "Window Right" }
},
{
{ 'n', 'i' }, '<C-b>', '<cmd>Neotree toggle<CR>', { desc = "Toggle Neotree" }
{ 'n', 'i' }, '<C-b>', '<cmd>NvimTreeToggle<CR>', { desc = "Toggle Neotree" }
},
{
{ 'n' }, ':', '<cmd>Telescope cmdline<CR>', { noremap = true, desc = "Open Cmdline" }

View File

@ -7,7 +7,7 @@ return {
"nvim-tree/nvim-web-devicons"
},
opts = {
fill_hl = "NeoTreeTabInactive",
fill_hl = "NvimTreeNormal",
show_if_buffers_are_at_least = 1,
buffers = {
focus_on_delete = "next",
@ -22,13 +22,13 @@ return {
if buffer.is_focused then
return "BufferCurrent"
end
return "NeoTreeTabInactive"
return "NvimTreeNormal"
end,
fg = function(buffer)
if buffer.is_focused then
return "BufferCurrent"
end
return "NeoTreeTabInactive"
return "NvimTreeNormal"
end,
},
components = {
@ -60,7 +60,7 @@ return {
return "DiagnosticHint"
end
else
return 'NeoTreeTabInactive'
return 'NvimTreeNormal'
end
end
},
@ -85,7 +85,7 @@ return {
end,
fg = function (buffer)
if not buffer.is_focused then
return 'NeoTreeTabInactive'
return 'NvimTreeNormal'
end
return "DiagnosticWarn"
end
@ -100,7 +100,7 @@ return {
end,
fg = function (buffer)
if not buffer.is_focused then
return 'NeoTreeTabInactive'
return 'NvimTreeNormal'
end
return "DiagnosticInfo"
end
@ -115,7 +115,7 @@ return {
end,
fg = function (buffer)
if not buffer.is_focused then
return 'NeoTreeTabInactive'
return 'NvimTreeNormal'
end
return "DiagnosticHint"
end
@ -150,13 +150,13 @@ return {
if tabpage.is_active then
return "lualine_a_command"
end
return "NeoTreeTabInactive"
return "NvimTreeNormal"
end,
fg = function(tabpage)
if tabpage.is_active then
return "lualine_a_command"
end
return "NeoTreeTabInactive"
return "NvimTreeNormal"
end
},
{
@ -192,13 +192,13 @@ return {
},
sidebar = {
filetype = {
'neo-tree'
'NvimTree'
},
components = {
{
text = '',
fg = "NeoTreeTabInactive",
bg = "NeoTreeTabInactive"
fg = "NvimTreeNormal",
bg = "NvimTreeNormal"
}
}
}

View File

@ -1,74 +0,0 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim"
},
opts = function(_,_)
local options = require("options")
return {
close_if_last_window = true,
popup_border_style = options.ui.border,
default_component_configs = {
container = {
enable_character_fade = true
},
indent = {
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- indent guides
with_markers = false,
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
modified = {
symbol = "",
},
git_status = {
symbols = {
-- Change type
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "-",-- this can only be used in the git_status source
renamed = "R",-- this can only be used in the git_status source
-- Status type
untracked = "U",
ignored = "",
unstaged = "",
staged = "S",
conflict = "C",
}
}
},
window = {
position = "left",
width = 40
},
filesystem = {
filtered_items = {
visible = true,
hide_dotfiles = false,
hide_gitignored = false,
hide_hidden = false,
},
follow_current_file = {
enabled = true,
leave_dirs_open = true
}
},
buffers = {
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
},
}
end
}
}

40
lua/plugins/nvim-tree.lua Normal file
View File

@ -0,0 +1,40 @@
return {
{
"nvim-tree/nvim-tree.lua",
opts = {
hijack_cursor = true,
sync_root_with_cwd = true,
diagnostics = {
enable = true,
show_on_dirs = true,
show_on_open_dirs = false,
},
update_focused_file = {
enable = true,
update_root = true,
ignore_list = { "help" },
},
modified = {
enable = true,
},
hijack_directories = {
enable = true
},
renderer = {
highlight_git = true,
icons = {
git_placement = "after",
diagnostics_placement = "after",
modified_placement = "after",
show = {
git = false,
},
},
},
view = {
signcolumn = "no",
width = 45
}
}
}
}