refactor: use lua api for user commands and autocommands (#1206)

BREAKING: plugin now requires nvim-0.7
This commit is contained in:
Michael
2022-05-14 10:49:45 +03:00
committed by GitHub
parent 90d7b8edb1
commit 46014449b6
5 changed files with 81 additions and 44 deletions

View File

@@ -72,11 +72,10 @@ function M.toggle_file_info(node)
setup_window(node)
vim.cmd [[
augroup NvimTreeRemoveFilePopup
au CursorMoved * lua require'nvim-tree.actions.file-popup'.close_popup()
augroup END
]]
a.nvim_create_autocmd("CursorMoved", {
group = a.nvim_create_augroup("NvimTreeRemoveFilePopup", {}),
callback = M.close_popup,
})
end
return M