summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorKyren223 <ulmliad223@gmail.com>2024-07-14 16:30:50 +0300
committerKyren223 <ulmliad223@gmail.com>2024-07-14 16:30:50 +0300
commit0df12a6506bacc7afb709df7443bf31bcc3d84ed (patch)
tree752d5e54ab6a12d8d40324b3e799df7d125e0578 /.config/nvim/lua
parenta2d25579a0c93fbac228b5b239f69e8f6d80bdf5 (diff)
Neovim: tweaked neotree a bit, might remove it in favor of oil.nvim
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/custom/plugins/neotree.lua25
1 files changed, 22 insertions, 3 deletions
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', '<leader>nt', '<cmd>Neotree toggle reveal left<cr>', { desc = '[N]eotree [T]oggle' })
end,
}