mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
add plugin nvim-tree.lua
This commit is contained in:
parent
dc4ff3d499
commit
590baf4ca9
62
lua/config/nvim-tree.lua
Normal file
62
lua/config/nvim-tree.lua
Normal file
@ -0,0 +1,62 @@
|
||||
local nvim_tree = require("nvim-tree")
|
||||
|
||||
nvim_tree.setup({
|
||||
disable_netrw = true,
|
||||
hijack_netrw = true,
|
||||
open_on_setup = false,
|
||||
ignore_ft_on_setup = {},
|
||||
auto_close = false,
|
||||
open_on_tab = false,
|
||||
hijack_cursor = false,
|
||||
update_cwd = false,
|
||||
update_to_buf_dir = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
update_cwd = false,
|
||||
ignore_list = {},
|
||||
},
|
||||
system_open = {
|
||||
cmd = nil,
|
||||
args = {},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
timeout = 500,
|
||||
},
|
||||
view = {
|
||||
width = 40,
|
||||
height = 30,
|
||||
hide_root_folder = false,
|
||||
side = "left",
|
||||
auto_resize = false,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {},
|
||||
},
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes",
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
require_confirm = true,
|
||||
},
|
||||
})
|
||||
vim.api.nvim_set_keymap("n", "<space>s", "<cmd>NvimTreeToggle<CR>", { noremap = true, silent = true })
|
||||
@ -354,6 +354,14 @@ require("packer").startup({
|
||||
|
||||
-- show and trim trailing whitespaces
|
||||
use {'jdhao/whitespace.nvim', event = 'VimEnter'}
|
||||
|
||||
-- file explorer
|
||||
use {
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
requires = { 'kyazdani42/nvim-web-devicons' },
|
||||
keys = {{'n', '<space>s'}, },
|
||||
config = [[require('config.nvim-tree')]]
|
||||
}
|
||||
end,
|
||||
config = {
|
||||
max_jobs = 16,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user