mirror of
https://github.com/mqttr/dotfiles.git
synced 2025-12-16 12:45:52 -06:00
38 lines
867 B
Lua
38 lines
867 B
Lua
-- Neo-tree is a Neovim plugin to browse the file system
|
|
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
|
|
|
-- Disable netrw for neo-tree
|
|
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
return {
|
|
'nvim-neo-tree/neo-tree.nvim',
|
|
version = '*',
|
|
dependencies = {
|
|
'nvim-lua/plenary.nvim',
|
|
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
|
'MunifTanjim/nui.nvim',
|
|
},
|
|
cmd = 'Neotree',
|
|
keys = {
|
|
{ '<leader>e', ':Neotree reveal action=focus toggle=true<CR>', silent=true }
|
|
},
|
|
init = function()
|
|
if vim.fn.argc(-1) == 1 then
|
|
local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
|
if stat and stat.type == "directory" then
|
|
require("neo-tree")
|
|
end
|
|
end
|
|
end,
|
|
opts = {
|
|
filesystem = {
|
|
window = {
|
|
mappings = {
|
|
['\\'] = 'close_window',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|