shellRaining/hlchunk.nvim

Characters are hidden behind indent lines

serhez opened this issue · 6 comments

serhez commented

Characters are sometimes hidden behind the indent lines (i.e., those generated by indent mode, not chunk or others).

I attach two screenshots, the first one having the indent lines enabled and the second one without them. As can be observed in the first screenshot, the parenthesis closing the if statement is hidden. Also, some of the initial letters of each line within the if statement are hidden. I believe the ideal solution would be to either start the indent line after the : happens in an if statement (at least on Python), or to simply hide the indent line whenever needed.

Screenshot 2023-07-06 at 16 29 16
Screenshot 2023-07-06 at 16 29 39

Thanks!

This is a similar issue to #44. Due to the caching algorithm, I will fix this bug as soon as possible.

The latest code has been pushed. maybe this situation will not happen again...🤔

serhez commented

@shellRaining Thanks for the work, but it still happens, exactly as shown in the pictures :(

Not sure if it's convenient to provide the test text in the image above?

and have you tested setting the "use_treesitter" option to true for indent mod?

serhez commented

Oh! I had use_treesitter = true; if I set it to false, it works well it seems 👍🏻. If set to false, is the plugin querying the LSP server?

https://github.com/shellRaining/hlchunk.nvim/tree/854297526e1484e31e97b9370129a2e815ef0639

The readme of this commit have mentioned the difference between whether use treesitter. As follow

you can choose a different indent render mode, one is base treesitter, another is base on the number of blank. the advantage of treeitter is that it is very accurate, but it may have low performance, and doesn't support some filetype, such as markdown, if you choose the latter mode, it will render faster (maybe), but will have some issues in particular situation, example below.