setup nvim-tree
This commit is contained in:
15
init.lua
15
init.lua
@@ -1,14 +1,5 @@
|
||||
-- config
|
||||
|
||||
vim.opt.guicursor = ""
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
local plugins = {
|
||||
require("plugins.catppuccin")
|
||||
}
|
||||
|
||||
-- lazy.vim
|
||||
require("options")
|
||||
require("keymaps")
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
|
||||
@@ -25,4 +16,6 @@ end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
local plugins = require("plugins")
|
||||
|
||||
require("lazy").setup(plugins)
|
||||
|
||||
1
lua/keymaps.lua
Normal file
1
lua/keymaps.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file explorer" })
|
||||
5
lua/options.lua
Normal file
5
lua/options.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
vim.opt.guicursor = ""
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
4
lua/plugins.lua
Normal file
4
lua/plugins.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
require("plugins.catppuccin"),
|
||||
require("plugins.nvim-tree")
|
||||
}
|
||||
35
lua/plugins/nvim-tree.lua
Normal file
35
lua/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
tag = "v1.14.0",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
tag = "v0.100"
|
||||
}
|
||||
},
|
||||
name = "nvim-tree",
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
view = {
|
||||
width = 30,
|
||||
side = "left"
|
||||
},
|
||||
git = {
|
||||
enable = true
|
||||
},
|
||||
renderer = {
|
||||
highlight_git = true
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {
|
||||
".git"
|
||||
}
|
||||
},
|
||||
update_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user