Closed TerseTears closed 2 years ago
The codeblock background highlight happens because the plugin currently only looks at the current view. I can add a bit of buffer to that :+1:
The red line though I can't reproduce.
Would there be a significant influence on performance if it just looked at the entire buffer (by changing local offset = 0
and local range = vim.api.nvim_buf_line_count(bufnr)
)?
Depends on the size of the file. Couple hundred lines, probably no. Couple hundred thousand lines, yes.
Now that markdown has a supported treesitter grammar as well, it might be nicer to switch to that. I'll think about this
I refactored everything to use treesitter. This should no longer happen.
Hello.
This may be two separate issues, but both seem to be related to how background highlights that aren't (completely) in view are cleared. The first issue is with a red line that shows when a headline goes out of view (seems it only happens if it's at a lower level). The second issue is with the code blocks and how the background highlight is removed midway. Below is an illustration:
https://user-images.githubusercontent.com/36173945/167283917-f87c435b-794c-49f4-9f9e-68b5a65987a4.mp4