nvim: run a formatted and update autocmds to new 0.7 api

This commit is contained in:
mequidis
2022-05-12 08:30:50 +03:00
parent bed9511897
commit dbb104cf21
21 changed files with 402 additions and 333 deletions

View File

@ -1,9 +1,13 @@
-- nvim tree
require'nvim-tree'.setup{
require("nvim-tree").setup({
update_cwd = true,
diagnostics = {
enable = true,
},
}
})
vim.cmd("autocmd BufEnter * ++nested 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",
})