shellRaining / hlchunk.nvim

This is the lua implementation of nvim-hlchunk, you can use this neovim plugin to highlight your indent line and the current chunk (context) your cursor stayed
MIT License
627 stars 31 forks source link

Characters are hidden behind indent lines #52

Closed serhez closed 1 year ago

serhez commented 1 year ago

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!

shellRaining commented 1 year ago

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

shellRaining commented 1 year ago

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

serhez commented 1 year ago

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

shellRaining commented 1 year ago

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 1 year ago

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?

shellRaining commented 1 year ago

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.