Skip to content

Commit

Permalink
fix: Fixed parsing issues on editor start
Browse files Browse the repository at this point in the history
When entering Neovim, the plugin no longer just renders the main tree. A
timer is used to delay the timing(by 5ms for now).

This may change in the future.
  • Loading branch information
OXY2DEV committed Oct 30, 2024
1 parent 0e1236e commit 46631b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/markview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ vim.api.nvim_create_autocmd({ "BufAdd", "BufEnter" }, {
vim.list_contains(markview.get_config("filetypes", {}), ft) and
not vim.list_contains(markview.get_config("buf_ignore", {}), bt)
then
markview.attach(event);
vim.uv.new_timer():start(5, 0, vim.schedule_wrap(function ()
markview.attach(event);
end));
end
end
});
Expand Down

0 comments on commit 46631b5

Please sign in to comment.