update config 28102023

This commit is contained in:
Javier Pacheco 2023-10-29 06:34:10 -05:00
parent 6c41fb4140
commit c1f70bb64a
2 changed files with 12 additions and 27 deletions

View File

@ -347,16 +347,17 @@ return {
end,
},
{
"nvim-tree/nvim-tree.lua",
version = "*",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
require("nvim-tree").setup {}
end,
},
-- {
-- "nvim-tree/nvim-tree.lua",
-- lazy = true,
-- version = "*",
-- dependencies = {
-- "nvim-tree/nvim-web-devicons",
-- },
-- config = function()
-- require("nvim-tree").setup {}
-- end,
-- },
{
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",

View File

@ -178,20 +178,4 @@ vim.keymap.set(
-- [[ nvim-tree ]]
map("n", "<leader>oe", ":NvimTreeToggle<CR>", opts)
vim.api.nvim_create_autocmd("QuitPre", {
callback = function()
local invalid_win = {}
local wins = vim.api.nvim_list_wins()
for _, w in ipairs(wins) do
local bufname = vim.api.nvim_buf_get_name(vim.api.nvim_win_get_buf(w))
if bufname:match("NvimTree_") ~= nil then
table.insert(invalid_win, w)
end
end
if #invalid_win == #wins - 1 then
-- Should quit, so we close all invalid windows.
for _, w in ipairs(invalid_win) do vim.api.nvim_win_close(w, true) end
end
end
})
map("n", "<C-e>", ":Vexplore<CR>", opts)