add nvim-tree

This commit is contained in:
2024-09-30 06:02:54 +02:00
parent 08dd334ac5
commit 6633cb8bc5
6 changed files with 31 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
require("config.lazy") require("config.lazy")
require("config.lsp") require("config.lsp")
require("config.theme") require("config.theme")
require("config.nvim-tree")

View File

@@ -24,4 +24,7 @@ require("lazy").setup({
"williamboman/mason.nvim", "williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
-- file explorer on the side
"nvim-tree/nvim-tree.lua"
}) })

View File

@@ -8,7 +8,7 @@ require('mason').setup({
} }
}) })
local servers = { 'pylsp', 'lua_ls', 'rust_analyzer' } local servers = { 'pylsp', 'lua_ls', 'rust_analyzer', 'zls'}
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
-- A list of servers to automatically install if they're not already installed -- A list of servers to automatically install if they're not already installed

25
lua/config/nvim-tree.lua Normal file
View File

@@ -0,0 +1,25 @@
require("nvim-tree").setup({
git = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
},
glyphs = {
folder = {
default = "",
},
},
},
},
})
local opts = {
noremap = true, -- non-recursive
silent = true, -- do not show message
}
vim.keymap.set('n', "<leader>e", function () require("nvim-tree.api").tree.toggle() end, opts)

View File

@@ -1 +1 @@
require("lua.plugins.lazy") require("plugins.lazy")

View File

@@ -32,7 +32,6 @@ map('n', '<leader>x', ':tabclose<CR>', opts)
map('n', '<leader>n', ':$tabnew<CR>', opts) map('n', '<leader>n', ':$tabnew<CR>', opts)
map('n', '<leader>s', ':$tab split<CR>', opts) map('n', '<leader>s', ':$tab split<CR>', opts)
----------------- -----------------
-- Visual mode -- -- Visual mode --
----------------- -----------------