diff --git a/.config/nvim/lua/custom/plugins/neotree.lua b/.config/nvim/lua/custom/plugins/neotree.lua index 661ab40..72f8b36 100644 --- a/.config/nvim/lua/custom/plugins/neotree.lua +++ b/.config/nvim/lua/custom/plugins/neotree.lua @@ -1,3 +1,6 @@ +-- TODO: Consider removing neotree +-- Not really using it due to oil.nvim, but maybe it's still +-- useful to have a tree-structure file explorer? return { 'nvim-neo-tree/neo-tree.nvim', branch = 'v3.x', @@ -6,10 +9,26 @@ return { 'nvim-tree/nvim-web-devicons', 'MunifTanjim/nui.nvim', }, - opts = { - open_files_do_not_replace_types = { 'terminal', 'Trouble', 'qf', 'edgy' }, - }, config = function() + require('neo-tree').setup({ + open_files_do_not_replace_types = { 'terminal', 'Trouble', 'qf', 'edgy' }, + window = { + mappings = { + ['e'] = function() + ---@diagnostic disable-next-line: deprecated + vim.api.nvim_exec('Neotree focus filesystem left', true) + end, + ['b'] = function() + ---@diagnostic disable-next-line: deprecated + vim.api.nvim_exec('Neotree focus buffers left', true) + end, + ['g'] = function() + ---@diagnostic disable-next-line: deprecated + vim.api.nvim_exec('Neotree focus git_status left', true) + end, + }, + }, + }) vim.keymap.set('n', 'nt', 'Neotree toggle reveal left', { desc = '[N]eotree [T]oggle' }) end, }