Hi and thanks for the plugin. I noticed that there is a blinking effect when passing empty lines while smaming "j". However, this only reproduces when cursorline is set
Steps to repro
install plugin
call require('indentmini').setup()
enable cursor line :set cursorline
press j multiple times for the cursor to pass an empty line surrounded by indented non empty lines
Before demo
https://github.com/nvimdev/indentmini.nvim/assets/5817809/a4b1921a-6c4d-464a-b945-ddd88783041b
The way I understood it, this happens because ctx is emptied after every tick in the on_end function. Which in turn defaults previous line to 0 inside on_line
I have tried looking up the indent level of a previous line by recursively walking up the lines until the first non empty line but that did not
A simple workaround would be to not empty the context. This of course can come at some memory consumption price. To ease it I added an autocommand that would empty the context once a buffer is closed.
After demo
https://github.com/nvimdev/indentmini.nvim/assets/5817809/82bb6333-44c1-4e39-be23-3a391697d9e9
Hi and thanks for the plugin. I noticed that there is a blinking effect when passing empty lines while smaming "j". However, this only reproduces when
cursorline
is setSteps to repro
require('indentmini').setup()
:set cursorline
j
multiple times for the cursor to pass an empty line surrounded by indented non empty linesBefore demo
https://github.com/nvimdev/indentmini.nvim/assets/5817809/a4b1921a-6c4d-464a-b945-ddd88783041bThe way I understood it, this happens because ctx is emptied after every tick in the
on_end
function. Which in turn defaults previous line to 0 insideon_line
https://github.com/nvimdev/indentmini.nvim/blob/b18d7168e59dbe8700649e2d58022432d8fde2e2/lua/indentmini/init.lua#L40
I have tried looking up the indent level of a previous line by recursively walking up the lines until the first non empty line but that did not
A simple workaround would be to not empty the context. This of course can come at some memory consumption price. To ease it I added an autocommand that would empty the context once a buffer is closed.
After demo
https://github.com/nvimdev/indentmini.nvim/assets/5817809/82bb6333-44c1-4e39-be23-3a391697d9e9Hope this helps