nviiim/after/plugin/neotree.lua
Robert Morrison d032e3e274
chore(repo): First contentful commit
This is the first commit that actually adds files to the repo.
Yes it's a bad commit but now the major features are here
2023-03-03 17:11:36 +00:00

49 lines
813 B
Lua

local ok, neotree = pcall(require,"neo-tree")
if not ok then
return
end
neotree.setup(
{
enable_git_status = true,
enable_diagnostics = true,
sort_case_insensitive = true,
filesystem = {
filtered_items = {
visible = false,
hide_dotfiles = true,
hide_gitignored = true,
hide_hidden = true,
},
follow_current_file = true,
hijack_netrw_behaviour = "open_default",
use_libuv_file_watcher = true,
},
window = {
position = "left"
},
buffers = {
follow_current_file = true,
}
})
-- keybindings
vim.keymap.set( 'n' ,
'<leader>n' ,
function ()
vim.cmd('Neotree toggle filesystem')
end ,
{ desc='Toggle neotree'})
vim.keymap.set( 'n' ,
'<leader>b' ,
function ()
vim.cmd('Neotree toggle buffers float')
end ,
{ desc='Toggle bufferlist'})