nvim: Add file tree

In addition to my standard file manager, vifm, being integrated into
neovim, I have now also added a side-pane file tree (akin to nerdtree)
that is easily reachable to get a quick overview of a file layout.

For now, I do not intend to do much more with the plugin, only keep it
for those rare cases I want to have a view on my file layout at the same
time as working in a buffer. For all other things (file operations
especially) I still have vifm.
This commit is contained in:
Marty Oehme 2023-03-22 15:58:18 +01:00
parent 88336a433a
commit f156292e8f
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
3 changed files with 17 additions and 5 deletions

View file

@ -49,11 +49,13 @@
"nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" }, "nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" },
"nvim-surround": { "branch": "main", "commit": "b98862527c4727c171f8626e04d8ae88ef6cb736" }, "nvim-surround": { "branch": "main", "commit": "b98862527c4727c171f8626e04d8ae88ef6cb736" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "a5638b2206c3930a16a24e5c184dddd572f8cd34" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "a5638b2206c3930a16a24e5c184dddd572f8cd34" },
"nvim-tree.lua": { "branch": "master", "commit": "aa9971768a08caa4f10f94ab84e48d2ceb30b1c0" },
"nvim-treesitter": { "branch": "master", "commit": "c38646edf2bdfac157ca619697ecad9ea87fd469" }, "nvim-treesitter": { "branch": "master", "commit": "c38646edf2bdfac157ca619697ecad9ea87fd469" },
"nvim-treesitter-context": { "branch": "master", "commit": "88d1627285f7477883516ef60521601862dae7a1" }, "nvim-treesitter-context": { "branch": "master", "commit": "88d1627285f7477883516ef60521601862dae7a1" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" },
"nvim-ts-rainbow2": { "branch": "master", "commit": "cee4601ff8aac73dee4afa1074814343bb5a0b80" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "cee4601ff8aac73dee4afa1074814343bb5a0b80" },
"nvim-web-devicons": { "branch": "master", "commit": "95b1e300699be8eb6b5be1758a9d4d69fe93cc7f" },
"otter.nvim": { "branch": "main", "commit": "cfb548957aed403d9838febd7223595d47b32031" }, "otter.nvim": { "branch": "main", "commit": "cfb548957aed403d9838febd7223595d47b32031" },
"playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" }, "playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" },
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },

View file

@ -211,6 +211,10 @@ map('n', '<leader>ss', ":lua MiniStarter.open()<cr>", { desc = 'show startpage'
map('n', '<leader>so', '<cmd>SymbolsOutline<cr>', map('n', '<leader>so', '<cmd>SymbolsOutline<cr>',
{ silent = true, desc = 'toggle symbol outline' }) { silent = true, desc = 'toggle symbol outline' })
-- PLUGIN: nvim-tree
map('n', '<leader>se', '<cmd>NvimTreeToggle<cr>',
{ silent = true, desc = 'toggle filetree' })
-- PLUGIN: easy-align -- PLUGIN: easy-align
-- Start interactive EasyAlign in visual mode (e.g. vipga) -- Start interactive EasyAlign in visual mode (e.g. vipga)
map('x', 'ga', '<Plug>(EasyAlign)') map('x', 'ga', '<Plug>(EasyAlign)')

View file

@ -1,18 +1,24 @@
local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" } local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
return { return {
-- vim plugs
-- essential -- essential
{ 'numToStr/Navigator.nvim', branch = "master", config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits { 'numToStr/Navigator.nvim', branch = "master", config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits
{ 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative { 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative
{ 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank { 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
{ 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak { 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak
-- files
{ 'vifm/vifm.vim' }, -- integrate file manager
{ {
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
opts = { numhl = true, signcolumn = false }, opts = { numhl = true, signcolumn = false },
event = "BufRead" event = "BufRead"
},
-- files
{ 'vifm/vifm.vim' }, -- integrate file manager
{
'nvim-tree/nvim-tree.lua', -- integrate file tree
config = true,
dependencies = { 'nvim-tree/nvim-web-devicons', config = true },
cmd = "NvimTreeToggle"
},
}, { }, {
'RRethy/nvim-base16', 'RRethy/nvim-base16',
event = "BufWinEnter", event = "BufWinEnter",
@ -66,7 +72,7 @@ return {
}, { 'edKotinsky/Arduino.nvim', ft = 'arduino', config = true }, -- statusline }, { 'edKotinsky/Arduino.nvim', ft = 'arduino', config = true }, -- statusline
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }, requires = { 'nvim-tree/nvim-web-devicons', config = true },
config = function() require('plug._lualine') end config = function() require('plug._lualine') end
}, -- writing }, -- writing
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, { { 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
@ -136,7 +142,7 @@ return {
vim.g.magma_image_provider = "kitty" vim.g.magma_image_provider = "kitty"
vim.g.magma_automatically_open_output = false vim.g.magma_automatically_open_output = false
end end
}, -- nvim plugs },
{ {
'echasnovski/mini.nvim', 'echasnovski/mini.nvim',
version = '*', version = '*',