fix: improve nvim performance

This commit is contained in:
Fabio Lenherr 2023-02-21 19:54:42 +01:00
parent 670014885b
commit fdcb340766
7 changed files with 115 additions and 173 deletions

View file

@ -242,13 +242,10 @@ vim.api.nvim_create_autocmd("BufEnter", {
local function open_nvim_tree(data)
-- buffer is a [No Name]
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
if not no_name and not directory then
if not directory then
return
end