Add nvim-tree setup

This commit is contained in:
Sonny Bakker 2024-08-26 20:14:12 +02:00
parent 7f908f1c40
commit 80222dd489
6 changed files with 29 additions and 3 deletions

View file

@ -148,6 +148,10 @@
src: 'templates/nvim/lua/indent-blankline.lua.j2',
dest: '{{ xdg_config_dir }}/nvim/lua/indent-blankline.lua',
}
- {
src: 'templates/nvim/lua/nvim-tree.lua.j2',
dest: '{{ xdg_config_dir }}/nvim/lua/_nvim-tree.lua',
}
- block:
- name: create neovim install directory

View file

@ -10,3 +10,4 @@ require('lua-line')
require('git-signs')
require('_telescope')
require('indent-blankline')
require('_nvim-tree')

View file

@ -1,6 +1,6 @@
local opts = {noremap=true, silent=true}
vim.api.nvim_set_keymap('n', '<C-E>', '<cmd>:NERDTreeToggle<CR>', opts)
vim.api.nvim_set_keymap('n', '<C-E>', '<cmd>:NvimTreeToggle<CR>', opts)
vim.api.nvim_set_keymap('n', 'ff', '<cmd>lua require("telescope.builtin").find_files()<CR>', opts)
vim.api.nvim_set_keymap('n', 'fg', '<cmd>lua require("telescope.builtin").live_grep()<CR>', opts)
vim.api.nvim_set_keymap('n', 'fb', '<cmd>lua require("telescope.builtin").buffers()<CR>', opts)

View file

@ -0,0 +1,18 @@
local nvim_tree = require('nvim-tree');
nvim_tree.setup {
renderer = {
icons = {
show = {
file = false,
folder = false,
modified = false,
hidden = false,
diagnostics = false,
bookmarks = false,
git = false,
folder_arrow = false
}
}
}
}

View file

@ -55,5 +55,9 @@ vim.o.background = 'light'
vim.o.laststatus = 2
vim.o.statusline = ' %F %m%r%w %= %{hostname()} %{strlen(&ft)?&ft:"none"} %{(&bomb?",BOM":"")} %{&ff} %l/%L %c %P'
-- use a dedicated file explorer
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- python interpreter
vim.g.python3_host_prog = './env/bin/python'

View file

@ -8,7 +8,7 @@ dotfiles_repo: 'git@git.fudiggity.nl:sonny/dotfiles.git'
public_dotfiles_repo: 'git@git.fudiggity.nl:sonny/dotfiles.git'
neovim_plugins:
- { url: 'https://github.com/preservim/nerdtree', name: 'nerdtree' }
- { url: 'https://github.com/nvim-tree/nvim-tree.lua', name: 'nvim-tree' }
- { url: 'https://github.com/neovim/nvim-lspconfig', name: 'nvim-lspconfig' }
- { url: 'https://github.com/hrsh7th/nvim-cmp/', name: 'nvim-cmp' }
- { url: 'https://github.com/hrsh7th/cmp-nvim-lsp/', name: 'cmp-nvim-lsp' }
@ -29,7 +29,6 @@ neovim_plugins:
name: 'gitsigns.nvim',
version: 'v0.9.0',
}
- { url: 'https://github.com/sainnhe/edge', name: 'edge' }
- { url: 'https://github.com/nvim-lualine/lualine.nvim', name: 'lualine' }
- {
url: 'https://github.com/catppuccin/nvim',