nvim: the epic config restructure

This commit is contained in:
2023-07-08 15:20:43 +03:00
parent 43a54ad044
commit 9a81f16153
31 changed files with 384 additions and 495 deletions

View File

@ -1,13 +1,22 @@
-- nvim tree
require("nvim-tree").setup({
update_cwd = true,
diagnostics = {
enable = true,
},
})
return {
"kyazdani42/nvim-tree.lua",
config = function()
-- nvim tree
require("nvim-tree").setup({
update_cwd = true,
diagnostics = {
enable = true,
},
})
-- close tab/vim when nvim-tree is the last window in the tab
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*",
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
})
-- close tab/vim when nvim-tree is the last window in the tab
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*",
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
})
end,
dependencies = {
"kyazdani42/nvim-web-devicons",
},
cmd = { "NvimTreeOpen", "NvimTreeToggle" },
}