update config 28102023
This commit is contained in:
parent
6c41fb4140
commit
c1f70bb64a
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue