From 94d59b68d4b5c5ff8e92c832cd5d5f2bf08abfec Mon Sep 17 00:00:00 2001 From: QQ Date: Sun, 15 Oct 2023 22:30:52 +0800 Subject: [PATCH] daasdasd --- init.lua | 2 ++ lua/neovim/keymap.lua | 5 ----- lua/neovim/plug.lua | 16 +++++++-------- lua/neovim/plugsettings/nvimtree.lua | 30 ++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/init.lua b/init.lua index 5c1aa91..c81a66d 100644 --- a/init.lua +++ b/init.lua @@ -43,4 +43,6 @@ else require('neovim.neovim') end + require('normal.normal') + diff --git a/lua/neovim/keymap.lua b/lua/neovim/keymap.lua index 221d3c6..8b13789 100644 --- a/lua/neovim/keymap.lua +++ b/lua/neovim/keymap.lua @@ -1,6 +1 @@ -local G, opt = require('G'), {noremap = true} ---NvimTree -G.map({ - {"n", "", ":NERDTreeToggle", opt}, -}) diff --git a/lua/neovim/plug.lua b/lua/neovim/plug.lua index df2de3b..b579ddc 100644 --- a/lua/neovim/plug.lua +++ b/lua/neovim/plug.lua @@ -12,13 +12,13 @@ return { require('neovim.plugsettings.theme'), -- nerdtree - { - 'preservim/nerdtree', - dependencies = { - 'Xuyuanp/nerdtree-git-plugin', - 'ryanoasis/vim-devicons', - }, - cmd = 'NERDTreeToggle', - }, + -- { + -- 'preservim/nerdtree', + -- dependencies = { + -- 'Xuyuanp/nerdtree-git-plugin', + -- 'ryanoasis/vim-devicons', + -- }, + -- cmd = 'NERDTreeToggle', + -- }, } diff --git a/lua/neovim/plugsettings/nvimtree.lua b/lua/neovim/plugsettings/nvimtree.lua index 97aeadd..30a9f1d 100644 --- a/lua/neovim/plugsettings/nvimtree.lua +++ b/lua/neovim/plugsettings/nvimtree.lua @@ -1,2 +1,32 @@ return { + 'kyazdani42/nvim-web-devicons', + { + 'kyazdani42/nvim-tree.lua', + config = function () + require'nvim-tree'.setup { + sort_by = "case_sensitive", + view = { + width = 30, + }, + -- renderer = { + -- group_empty = true, + -- }, + filters = { + dotfiles = true, + }, + -- -- 关闭文件时自动关闭 + -- auto_close = true, + -- -- 不显示 git 状态图标 + -- git = { + -- enable = true + -- } + } + G.map({ + {"n", "", ":NvimTreeToggle",{noremap = true}}, + }) + end + + } + } +