add neotree

This commit is contained in:
Adithya 2024-06-10 00:58:42 +05:30
parent ff0131d0e6
commit c903727762
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 43 additions and 1 deletions

View file

@ -15,7 +15,7 @@ Plugin.opts = {
component_separators = "|",
section_separators = "",
disabled_filetypes = {
statusline = { "NvimTree" },
statusline = { "neo-tree" },
},
},
}

42
lua/plugins/neotree.lua Normal file
View file

@ -0,0 +1,42 @@
local Plugin = { "nvim-neo-tree/neo-tree.nvim" }
Plugin.branch = "v3.x"
Plugin.dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
}
Plugin.lazy = false
function Plugin.init()
-- disable netrw (neovim's default file explorer)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
end
Plugin.opts = {
close_if_last_window = false,
enable_diagnostics = true,
enable_git_status = true,
filesystem = {
filtered_items = {
visible = true,
},
follow_current_file = {
enabled = true,
},
use_libuv_file_watcher = true,
},
}
Plugin.cmd = "Neotree"
Plugin.keys = {
{ "<leader>1", "<cmd>Neotree toggle<cr>", desc = "Toggle Neotree" },
}
function Plugin.config()
require("neo-tree").setup({})
end
return Plugin