jinh0 / eyeliner.nvim

👀 Move faster with unique f/F indicators.
441 stars 14 forks source link

Need to set `clear=true` for the augroup to prevent lagging after changing between colorschemes #36

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

As title. Otherwise Neovim will get frozen after changing between colorschemes because of the title.

jinh0 commented 1 year ago

Hey @nyngwang I added the clear option in the latest commit, hope that fixes the lag! I am a little curious since the documentation does say that the clear option is enabled by default.

Let me know if you are still experiencing lag!

nyngwang commented 1 year ago

I still encountered the same frozen issue after trying 0b21a86.

Yuhf7 commented 1 year ago

I am a little curious since the documentation does say that the clear option is enabled by default.

To my knowledge, clear is enabled by default; however, that only applies to creating the augroup. If you re-create the same autocommand without first clearing the augroup it won't remove previous autocommands. https://github.com/jinh0/eyeliner.nvim/blob/a6c05ed7f2a59640bd18ff0702694deda483a08e/fnl/eyeliner/shared.fnl#L18-L19

Here you'd have to call vim.api.nvim_create_augroup("Eyeliner", {}) before assigning "Eyeliner" to group.

nyngwang commented 1 year ago

@Yuhf7 While I don't have time to confirm it, it sounds promising! Thanks for your help!

jinh0 commented 1 year ago

I merged your pull request @Yuhf7 ! @nyngwang Let me know if it's fixed!

nyngwang commented 1 year ago

@jinh0 It works :) Now I can install it back! Thank you!